Project

General

Profile

Actions

Defect #5908

closed

Context menu submenus can extend beyond the window

Defect #5908: Context menu submenus can extend beyond the window

Added by Aaron Parks over 16 years ago. Updated about 9 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
UI
Target version:
Resolution:
Fixed
Affected version:

Description

When using Firefox the right click menu does not leave enough room for submenus and their appear off screen (see scr)


Files

WeirdDraw.png (93.9 KB) WeirdDraw.png Example of submenu that cannot be accessed. Aaron Parks, 2010-07-19 20:54
contextmenuMisplacement.png (21.9 KB) contextmenuMisplacement.png example of misplaced context menu Daniel Felix, 2013-01-15 10:28
0001-Fix-context-menu-and-its-submenus-extending-beyond-t.patch (5.4 KB) 0001-Fix-context-menu-and-its-submenus-extending-beyond-t.patch Go MAEDA, 2026-11-21 09:15
0002-Remove-commented-out-code-for-IE-from-context_menu.j.patch (875 Bytes) 0002-Remove-commented-out-code-for-IE-from-context_menu.j.patch Go MAEDA, 2026-11-21 09:15
context-menu-5908-before.png (14.3 KB) context-menu-5908-before.png Go MAEDA, 2026-11-21 09:21
context-menu-5908-after.png (14.6 KB) context-menu-5908-after.png Go MAEDA, 2026-11-21 09:21

Related issues 1 (0 open — 1 closed)

Related to Redmine - Defect #6053: Fixed issue list context menu overflowClosedActions

Updated by Felix Schäfer over 16 years ago Actions #1

IIRC this wasn't firefox-only nor are you the first to notice it, pretty sure there already is a ticket for this. Could you try to find it so we can mark this one a duplicate of the other?

Updated by Aaron Parks over 16 years ago Actions #2

The only two I could find that were similar #960 and #618.

Updated by Felix Schäfer over 16 years ago Actions #3

There's a proposed patch in #6053, haven't tested it though.

Updated by Felix Schäfer over 16 years ago Actions #4

  • Category set to UI

Updated by Daniel Felix almost 14 years ago Actions #5

I can confirm this in the current Redmine Release (2.2.1) with current Firefox Release (18).

The rendering isn't weird anymore but the placement of the contextmenu could be realy improved (see screenshot attached).
This could be forced by a smaller window height and some scrolling (you need to scroll 50-80px downwards - depending on your theme). There's enough place to display it beneath, but instead it's display above, which causes the loss of the edit link.

In my opinion, the context menu doesn't respect the current viewport of the user for the calculation for it's position.

Updated by Go MAEDA 12 days ago Actions #6

I confirmed that this issue still occurs with Firefox 160 on the current trunk. It also occurs in Chrome, because the cause is in the JavaScript that positions the context menu.

To reproduce it:

1. Open the issue list in a browser window that is about 600 to 800 pixels high.
2. Right-click an issue near the vertical middle of the window. The context menu does not fit below the pointer, so it opens above it and is moved to the top of the window.
3. Hover over the "Status" submenu.

The submenu opens upward even though the menu is at the top of the window, so it extends beyond the top of the window and its upper items cannot be seen or selected. When the page is scrolled down, the context menu itself can also be placed above the top of the window.

The attached patch makes the following changes in context_menu.js:

  • Each submenu opens in the direction where it fits, based on the measured space above and below its item. Previously, the direction was decided by fixed thresholds (325px and 345px), and all submenus opened upward when the menu was displayed above the pointer.
  • If a submenu does not fit in either direction, its height is limited so that it can be scrolled.
  • The top of the context menu is kept inside the visible area, taking the scroll position into account.

One limitation remains: if the context menu itself is taller than the window, its lower part still extends below the window, although it can be reached by scrolling the page.

#6053 reports the same problem, so I think it can be closed as a duplicate.

Before After

Updated by Go MAEDA 9 days ago Actions #7

  • Target version changed from Candidate for next minor release to 6.1.7

Setting the target version to 6.1.7.

Updated by Go MAEDA about 22 hours ago Actions #8

  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patches in r25547 and r25548.

Updated by Marius BĂLTEANU about 9 hours ago Actions #9

  • Status changed from Resolved to Closed

Merged both fixes to stable branches, thanks!

Actions

Also available in: PDF Atom