Opened 4 years ago

Closed 4 years ago

#9956 closed defect (bug) (fixed)

Fix for submenu position and state on folded admin menu

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

Description

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 4 years ago.
submenu-position-fix.diff (1.1 KB) - added by sambauers 4 years ago.

Download all attachments as: .zip

Change History (7)

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

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

azaozz4 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.

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

  • 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.