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

        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.
        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 .
        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 .

          People

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

            Dates

            • Created:
              Updated:
              Resolved: