ICEfaces
  1. ICEfaces
  2. ICE-7053

panelTooltip displays in wrong position when browser view is scrolled down

    Details

      Description

      If a panelTooltip is displayed on a page that have been scrolled down in the browser, the tooltip displays away from the mouse pointer. This is not an issue with the ICEfaces 1.8.2 CE or ICEfaces EE 1.8.2 P02 release.

        Activity

        Hide
        Mircea Toma added a comment -

        Changed viewportOffset function to include body's scroll offsets when calculating the total viewport offset for a given element. This effectively restores the algorithm used in pre-1.7 PrototypeJS.

        Show
        Mircea Toma added a comment - Changed viewportOffset function to include body's scroll offsets when calculating the total viewport offset for a given element. This effectively restores the algorithm used in pre-1.7 PrototypeJS.
        Hide
        Mircea Toma added a comment -

        The fix works with IE7 as well.

        Show
        Mircea Toma added a comment - The fix works with IE7 as well.
        Hide
        Arran Mccullough added a comment -

        This issue is almost fixed. In the attached test case if you display the tooltip for most rows it works perfectly. If you try to display the tooltip for the last three rows in the table to tooltip displays away from where it should be.

        Show
        Arran Mccullough added a comment - This issue is almost fixed. In the attached test case if you display the tooltip for most rows it works perfectly. If you try to display the tooltip for the last three rows in the table to tooltip displays away from where it should be.
        Hide
        Mircea Toma added a comment -

        This last problem is caused by the fact that the tooltip panel is also a draggable panel. The draggable positioning code takes precedence and brings the panel into the visible viewport in case it's positioned outside. The tooltip positioning then tries to move the panel close to where the 'mouseover' event coordinates where. Unfortunately the code assumes that the panel was positioned exactly where the 'mouseover' coordinates where without being aware that the draggable positioning code already changed panel's top/left coordinates.

        Show
        Mircea Toma added a comment - This last problem is caused by the fact that the tooltip panel is also a draggable panel. The draggable positioning code takes precedence and brings the panel into the visible viewport in case it's positioned outside. The tooltip positioning then tries to move the panel close to where the 'mouseover' event coordinates where. Unfortunately the code assumes that the panel was positioned exactly where the 'mouseover' coordinates where without being aware that the draggable positioning code already changed panel's top/left coordinates.
        Hide
        Mircea Toma added a comment -

        Corrected tooltip positioning algorithm. The algorithm uses now the captured mouse coordinates instead of the panel's top/left coordinates.

        Show
        Mircea Toma added a comment - Corrected tooltip positioning algorithm. The algorithm uses now the captured mouse coordinates instead of the panel's top/left coordinates.
        Hide
        Ken Fyten added a comment -

        Since the last commit the tooltip demo in Component Showcase throughs a JS error in IE7.

        Show
        Ken Fyten added a comment - Since the last commit the tooltip demo in Component Showcase throughs a JS error in IE7.
        Hide
        Ken Fyten added a comment -

        This commit includes JDK 1.5+ API usage that must be corrected for icefaces/trunk to maintain JDK 1.4 compatibility.

        • The tooltip is never displayed when hovering over the province text. This also causes an exception in the server log:

        <Apr 10, 2012 6:26:42 AM MDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=26999190,name=component-showcase,context-path=/component-showcase)] Root cause of ServletException.
        java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
        at com.icesoft.faces.component.paneltooltip.PanelTooltip.applyStyle(PanelTooltip.java:216)
        at com.icesoft.faces.component.panelpopup.PanelPopupRenderer.encodeBegin(PanelPopupRenderer.java:260)
        at com.icesoft.faces.component.paneltooltip.PanelTooltipRenderer.encodeBegin(PanelTooltipRenderer.java:75)

        Show
        Ken Fyten added a comment - This commit includes JDK 1.5+ API usage that must be corrected for icefaces/trunk to maintain JDK 1.4 compatibility. The tooltip is never displayed when hovering over the province text. This also causes an exception in the server log: <Apr 10, 2012 6:26:42 AM MDT> <Error> <HTTP> <BEA-101017> < [ServletContext(id=26999190,name=component-showcase,context-path=/component-showcase)] Root cause of ServletException. java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; at com.icesoft.faces.component.paneltooltip.PanelTooltip.applyStyle(PanelTooltip.java:216) at com.icesoft.faces.component.panelpopup.PanelPopupRenderer.encodeBegin(PanelPopupRenderer.java:260) at com.icesoft.faces.component.paneltooltip.PanelTooltipRenderer.encodeBegin(PanelTooltipRenderer.java:75)
        Hide
        Mircea Toma added a comment -

        Fixed by using JDK 1.4 API to replace character sequences in strings.

        Show
        Mircea Toma added a comment - Fixed by using JDK 1.4 API to replace character sequences in strings.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: