ICEfaces
  1. ICEfaces
  2. ICE-4853

ice:panelTooltip positioning improvements

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      Currently when the ice:panelTooltip component is displayed, it *seems* to position itself relative to the mouse position at the time the tooltip hover delay was initiated. This results in it popping up away from mouse if the mouse is moved slightly in the meantime.

      It would be better if the panelTooltip would always position itself such that the bottom left corner of the tooltip panel was a few pixels above and to the right of the mouse-position at the time of it's display. We should also add logic similar to the panelPopup such that if displaying the toolTip in the normal position would place it partially off the viewport we adjust it (above left of the mouse, below right, below left, etc. The same logic used for the panelPopup should be used for panelToolip.

        Activity

        Ken Fyten created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Assignee Priority P2
        Assignee Yip Ng [ yip.ng ]
        Priority Major [ 3 ] Minor [ 4 ]
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 1.8.2 [ 10190 ]
        Hide
        yip.ng added a comment -

        There is already code to account for the mouse movement. The problem is that mouse move events are accumulative. So when the hover timer event happens, you only have the cursor position of the last accumulated mouse move event.

        Since there is no way to determine the current cursor position without an event , we need to do the popup logic in the mouse move event as well, and coordinate between the hover timer event and mouse move event. But even then, because of the accumulative nature of mouse move events, there is still a chance that the cursor will be too far away from the popup, unless we make the popup move with the mouse.

        Show
        yip.ng added a comment - There is already code to account for the mouse movement. The problem is that mouse move events are accumulative. So when the hover timer event happens, you only have the cursor position of the last accumulated mouse move event. Since there is no way to determine the current cursor position without an event , we need to do the popup logic in the mouse move event as well, and coordinate between the hover timer event and mouse move event. But even then, because of the accumulative nature of mouse move events, there is still a chance that the cursor will be too far away from the popup, unless we make the popup move with the mouse.
        Hide
        Ken Fyten added a comment -

        Moving the popup with the mouse isn't a bad idea, so long as it disappears, etc. normally when the hideOn event occurs.

        Show
        Ken Fyten added a comment - Moving the popup with the mouse isn't a bad idea, so long as it disappears, etc. normally when the hideOn event occurs.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19191 Tue Aug 25 09:53:47 MDT 2009 yip.ng ICE-4853: ice:panelTooltip positioning improvements.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltooltip/PanelTooltip.java
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/tooltip_panelpopup.js
        Hide
        yip.ng added a comment -

        Changed to make popup display above and to the right of cursor. Also made popup move with cursor.

        Adjusting position to within viewport has already been done in ICE-3736.

        Show
        yip.ng added a comment - Changed to make popup display above and to the right of cursor. Also made popup move with cursor. Adjusting position to within viewport has already been done in ICE-3736 .
        yip.ng made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Joanne Bai added a comment -

        Tested with success on ICEfaces revision 19194 + tomcat 6.0.2 for all versions of component showcase sample on FF3.5 and IE7

        Show
        Joanne Bai added a comment - Tested with success on ICEfaces revision 19194 + tomcat 6.0.2 for all versions of component showcase sample on FF3.5 and IE7
        Hide
        yip.ng added a comment -

        For tooltip positioning within viewport, see also comments in ICE-4915.

        Show
        yip.ng added a comment - For tooltip positioning within viewport, see also comments in ICE-4915 .
        Ken Fyten made changes -
        Fix Version/s 1.8.2-RC1 [ 10210 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19910 Wed Dec 09 13:20:01 MST 2009 adnan.durrani 1.8.2EE panelTooltip changes moved to Compat panelTooltip towards ICE-4481. The changes include the fix of following JIRAs: ICE-3745, ICE-3874, ICE-4853, ICE-3874 and ICE-4952
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/resources/META-INF/resources/ice-extras.js
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/component-metadata/src/main/resources/conf/ice_cust_properties/cust-paneltooltip-props.xml
        Commit graph MODIFY /icefaces/scratchpads/glimmer/compat/core/src/main/java/com/icesoft/faces/util/CoreUtils.java
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P2

          People

          • Assignee:
            yip.ng
            Reporter:
            Ken Fyten
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: