プロジェクト

全般

プロフィール

Vote #62951

完了

Right click menu can be rendered off-screen

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
低め
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2008/03/30
期日:
進捗率:

0%

予定工数:
category_id:
10
version_id:
1
issue_org_id:
960
author_id:
695
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

The js that displays the menu is located here @public/javascripts/context_menu.js@ (see @showMenu@ on line 95).
Good luck :-)
--------------------------------------------------------------------------------
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.
--------------------------------------------------------------------------------
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!
--------------------------------------------------------------------------------


related_issues

relates,Closed,981,Incompatbility with prototype.js version 1.6.0.2
duplicates,Closed,618,right click on an issue line near the bottom of the browser doesn't display menu

Admin Redmine さんが約4年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン0.7_1 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0