Make WordPress Core


Ignore:
Timestamp:
01/31/2018 05:02:27 PM (6 years ago)
Author:
afercia
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.
Fixes 39859.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media-template.php

    r42444 r42624  
    183183
    184184    <script type="text/html" id="tmpl-media-modal">
    185         <div class="<?php echo $class; ?>">
     185        <div tabindex="0" class="<?php echo $class; ?>">
    186186            <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>
    187187            <div class="media-modal-content"></div>
Note: See TracChangeset for help on using the changeset viewer.