Details
-
Type: Improvement
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.1-Beta
-
Component/s: ACE-Components
-
Labels:None
-
Environment:Tomcat 7.0.12
ICEfaces-2.1.0.BETA-10022011-bin
-
Assignee Priority:P1
Description
In the Williams poc in screen1.xhtml remove everything below the master (first) ace:dataTable. Now alter the browser window so the bottom is at the bottom of the ace:dataTable. If you right-click to use the ace:contextmenu at the bottom of the ace:dataTable/browser window you will not see the menu because it renders below, where it is not visible to us.
In this case ideally it should be rendered above the right click in the visible portion of the window.
In this case ideally it should be rendered above the right click in the visible portion of the window.
This is a bug in PF JS code.
wijmo menu doesn't have a separate context menu, it just has a right click option to trigger the menu. wijmo itself doesn't set the position for you, probably their design is that a click may trigger a menu somewhere else, not necessarily at the mouse pointer.
Also, the workings are different than the menu bar. In menu bar there is the root menu as the positioning context, and the positioning is also based on the super menu item, not the mouse pointer coordinates.
In a context menu, all you have are mouse pointers, and mouse pointer coordinates are either based on the document or the window. There is no such thing as using an element as the positioning context for the mouse pointers.
So PF tried to do the positioning themselves. In doing it they had the misconception like we had many times when developing our original old components: There is only one positioning context, the document, and all positioning is done with reference to the document. Instead of using jQuery positioning utilities, they also tried to reinvent the wheel and used the crude approach of manipulating the CSS top and left properties, without regard to cross-browser concerns.
So with just the addition of the tabset as a positioning context, the code just broke right away.
Fixed with another way of doing positioning using jQuery positioning utility, hopefully more robust and cross-browser. Tested: FF7, IE7, IE9, Chrome 14, Safari 5. See video at http://screencast.com/t/eAQC5eAtk5E.
Revision: 25949
Modified : /icefaces-ee/scratchpads/grimlock/icefaces/ace/component/resources/icefaces.ace/menu/menu.js