Make WordPress Core


Ignore:
Timestamp:
01/31/2018 11:54:02 PM (8 years ago)
Author:
SergeyBiryukov
Message:

Media: avoid page scrolling when opening the media modal.

Moves focus to a proper element within the media modal to avoid the underlying
page to scroll to the bottom. Removes the media modal freeze option.

Props andreiglingeanu, adamsilverstein.
Merges [42624] to the 4.9 branch.
Fixes #39859.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

  • branches/4.9/src/wp-includes/media-template.php

    r41325 r42627  
    163163
    164164    <script type="text/html" id="tmpl-media-modal">
    165         <div class="<?php echo $class; ?>">
     165        <div tabindex="0" class="<?php echo $class; ?>">
    166166            <button type="button" class="media-modal-close"><span class="media-modal-icon"><span class="screen-reader-text"><?php _e( 'Close media panel' ); ?></span></span></button>
    167167            <div class="media-modal-content"></div>
Note: See TracChangeset for help on using the changeset viewer.