[wp-trac] [WordPress Trac] #29074: Disable background page scrolling when modals are open

WordPress Trac noreply at wordpress.org
Thu Jul 31 01:27:36 UTC 2014


#29074: Disable background page scrolling when modals are open
------------------------------+------------------
 Reporter:  celloexpressions  |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  4.0
Component:  General           |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch         |     Focuses:  ui
------------------------------+------------------

Comment (by afercia):

 hi @celloexpressions, that would be great not just for the scrolling
 issue.
 Please consider to extend your idea cause one thing that really misses
 it's an easy way to detect when *any* overlay + modal is "open" in the
 admin. I recently had the need to detect if an overlay was shown for a
 small plugin I'm using for development purposes where I need a couple of
 controls displayed with a higher stack order than the overlays. That makes
 sense since it's a plugin for development only but I bet many developers
 would find very useful something like: "if any overlay is open, then do
 this" thing.
 I ended up doing my own thing checking for:

 #fullscreen-overlay
 #mce-modal-block
 #wp-link-backdrop
 .media-modal-backdrop
 .theme-install-overlay
 .wp-full-overlay
 .ui-find-overlay
 #TB_overlay
 #wp-auth-check-bg
 .notification-dialog-background

 and then checking if they're :visible. And maybe I'm still missing some
 overlay :)
 Of course, it would have been far easier to check just for "modal-open" on
 the body. Or "has-overlay", whatever :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/29074#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list