WordPress.org

Make WordPress Core

Changeset 20387


Ignore:
Timestamp:
04/06/12 21:40:57 (2 years ago)
Author:
azaozz
Message:

Reset negative top margin on submenus when folding/unfolding the admin menu, fixes #20380

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/common.dev.js

    r20272 r20387  
    173173        var body = $(document.body); 
    174174 
     175        // reset any compensation for submenus near the bottom of the screen 
     176        $('#adminmenu div.wp-submenu').css('margin-top', ''); 
     177 
    175178        if ( body.hasClass('folded') ) { 
    176179            body.removeClass('folded'); 
     
    206209 
    207210            if ( o > 1 ) 
    208                 m.css({'marginTop':'-'+o+'px'}); 
    209             else if ( m.css('marginTop') ) 
    210                 m.css({'marginTop':''}); 
     211                m.css('margin-top', '-'+o+'px'); 
     212            else 
     213                m.css('margin-top', ''); 
    211214 
    212215            menu.find('.wp-submenu').removeClass('sub-open'); 
Note: See TracChangeset for help on using the changeset viewer.