Make WordPress Core

Changeset 47263


Ignore:
Timestamp:
02/11/2020 03:24:47 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Widgets: Prevent currently active wide widget controls from being partially covered by another widget's controls.

The currently active widget controls should always be displayed on top.

Props audrasjb, fervillz, rinkuyadav999, jaydeep23290, ashokrd2013, melchoyce, pento, westonruter, SergeyBiryukov.
Fixes #42001.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/admin/widgets.js

    r47122 r47263  
    128128
    129129        $(document.body).bind('click.widgets-toggle', function(e) {
    130             var target = $(e.target),
    131                 css = { 'z-index': 100 },
     130            var target = $(e.target), css = {},
    132131                widget, inside, targetWidth, widgetWidth, margin, saveButton, widgetId,
    133132                toggleBtn = target.closest( '.widget' ).find( '.widget-top button.widget-action' );
     
    213212            distance: 2,
    214213            helper: 'clone',
    215             zIndex: 100,
     214            zIndex: 101,
    216215            containment: '#wpwrap',
    217216            refreshPositions: true,
  • trunk/src/wp-admin/css/widgets.css

    r47257 r47263  
    55    position: relative;
    66    box-sizing: border-box;
     7}
     8
     9.widget.open {
     10    z-index: 99;
     11}
     12.widget.open:focus-within {
     13    z-index: 100;
    714}
    815
Note: See TracChangeset for help on using the changeset viewer.