Defect #960
closedRight click menu can be rendered off-screen
0%
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
Related issues
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 :-)
Updated by Mike Duchene over 16 years ago
- File context_menu_patch.diff context_menu_patch.diff added
- File context_menu.js context_menu.js added
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.
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!