Project

General

Profile

Actions

Defect #960

closed

Right click menu can be rendered off-screen

Added by Mike Duchene over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
UI
Target version:
Start date:
2008-03-30
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The right click menu is always rendered below and to the right of the mouse cursor. Thus it is possible to cause this menu to be rendered "off the screen". For example, if you go into issues and right click on an issue towards the bottom of the browser window, the entire menu will be rendered below the visible browser area.

If the cursor is towards the bottom of the browser window then the menu should be rendered above (instead of below).
If the cursor is towards the right of the browser window then the menu should be rendered to the left (instead of to the right).
In the degenerate case when the cursor is close to all sides of the browser window (i.e. the browser window is resized to be very small) then the menu should be rendered in the default manner.

Obviously this is low priority.

As I am not familiar with the source layout, if someone wants to point me to which source file generate the menu I would be willing to take a crack at doing this. This would be a good example to learn the code and help contribute.


Files

context_menu_patch.diff (2.47 KB) context_menu_patch.diff the patch Mike Duchene, 2008-04-03 03:42
context_menu.js (6.33 KB) context_menu.js the file (incase the patch does not work) Mike Duchene, 2008-04-03 03:42

Related issues

Related to Redmine - Defect #981: Incompatbility with prototype.js version 1.6.0.2Closed2008-04-03

Actions
Is duplicate of Redmine - Defect #618: right click on an issue line near the bottom of the browser doesn't display menuClosed2008-02-08

Actions
Actions #1

Updated by Jean-Philippe Lang over 16 years ago

The js that displays the menu is located here public/javascripts/context_menu.js (see showMenu on line 95).
Good luck :-)

Actions #2

Updated by Mike Duchene over 16 years ago

see attached patch for suggested fix.
patched against posted 0.7.0_RC1.
Fully tested with FF 2.0.0.12.
Mostly tested with IE6 and IE7.
Need to test with IE5 (if this is even necessary).
Should work with all other browsers.

Actions #3

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from New to Closed
  • Target version set to 0.7
  • Resolution set to Fixed

Thanks for this patch Mike. It's committed in r1323.
I made a slight change so that the submenus are also displayed above or to the left.
Tested with FF2, IE6/7, Safari3, Opera8 (submenus will always be displayed on the right with IE6). Personnaly, I do not (and won't) test anything with IE5.

Thanks!

Actions

Also available in: Atom PDF