Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#9956 closed defect (bug) (fixed)

Fix for submenu position and state on folded admin menu

Reported by: sambauers Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.8
Component: Administration Keywords: javascript
Focuses: Cc:


This patch has better math for determining the lower bounds of the pop-out sub menus in the "folded" admin menu.

The existing math is a bit hit and miss as it uses some strange derivative of the cursor position on mouse-over.

Also, the menu state should always be restored to apply proper classes to submenus, even when they are folded up. This allows the unfolding to reveal the right submenus straight away rather than on a page refresh.

Attachments (2)

menu-offset.jpg (21.0 KB) - added by azaozz 12 years ago.
submenu-position-fix.diff (1.1 KB) - added by sambauers 12 years ago.

Download all attachments as: .zip

Change History (7)

#1 @sambauers
12 years ago

Sorry, I wasn't sure how to make the non-dev version of the JS file.

#2 @sambauers
12 years ago

Also, this needs some basic cross-browser testing, although it only uses jQuery methods, so all the numbers should be right across browsers.

12 years ago

#3 @azaozz
12 years ago

The popup submenu offset has to be calculated against the viewport (visible part of the page) not the page length (screenshot attached). For more precise calculation we can probably use event.target to get the exact position, think that's normalized in jQuery 1.3.2.

#4 @sambauers
12 years ago

Attaching new diff that stops the menu from disappearing below the fold.

#5 @azaozz
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11483]) Fix submenu position and state on folded admin menu, props sambauers, fixes #9956

Note: See TracTickets for help on using tickets.