[wp-trac] [WordPress Trac] #19994: Sticky admin menu

WordPress Trac wp-trac at lists.automattic.com
Sun Feb 12 21:13:51 UTC 2012


#19994: Sticky admin menu
-------------------------+----------------------
 Reporter:  tillkruess   |       Owner:
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:
Component:  UI           |     Version:  3.3.1
 Severity:  normal       |  Resolution:  wontfix
 Keywords:               |
-------------------------+----------------------

Comment (by JosephSilber):

 Replying to [comment:12 dd32]:
 > Any implementation of this would have to handle switching between fixed
 and scrollable on the fly as the page, and/or menu's open changed..
 Limiting it to certain conditions helps, but doesn't completely fix it.
 >
 > I'd like to see this, but agree, that it would be best implemented as a
 plugin first, even if only for the proof of concept/initial patch.

 ----

 Here's a quick proof of concept:

 {{{
 jQuery(document).ready(function($)
 {
         var $window = $(window),
                 $adminmenuwrap = $('#adminmenuwrap'),
                 windowHeight = $window.height();

         $adminmenuwrap.click(function()
         {
                 $adminmenuwrap.css('position', $adminmenuwrap.height() <=
 windowHeight ? 'fixed' : '');

         })
         .click();

         $window.resize(function()
         {
                 windowHeight = $window.height();
                 $adminmenuwrap.click();
         });
 });
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19994#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list