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

        Arran Mccullough created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Attachment tooltip-scroll-issue-182-CE.JPG [ 13352 ]
        Attachment tooltip-scroll-issue-182-P03.JPG [ 13353 ]
        Arran Mccullough made changes -
        Attachment Case10297Example.war [ 13354 ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000Gxpeh]
        Ken Fyten made changes -
        Fix Version/s EE-2.0.0.GA_P01 [ 10271 ]
        Fix Version/s 2.1 [ 10241 ]
        Fix Version/s EE-1.8.2.GA_P04 [ 10280 ]
        Assignee Mircea Toma [ mircea.toma ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25251 Mon Aug 15 07:57:34 MDT 2011 mircea.toma ICE-7053 Change 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.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/prototype/dom.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25252 Mon Aug 15 08:01:42 MDT 2011 mircea.toma ICE-7053 Change 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.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/javascript/prototype/prototype.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #25253 Mon Aug 15 08:10:25 MDT 2011 mircea.toma ICE-7053 Change 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.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/core/src/main/javascript/prototype/prototype.js
        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.
        Mircea Toma made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        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.
        Arran Mccullough made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Assignee Priority P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26117 Fri Oct 28 07:16:25 MDT 2011 mircea.toma ICE-7053 Corrected tooltip positioning algorithm. The algorithm uses now the captured mouse coordinates instead of the panel's top/left coordinates.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltooltip/PanelTooltip.java
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/tooltip_panelpopup.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26118 Fri Oct 28 07:16:54 MDT 2011 mircea.toma ICE-7053 Corrected tooltip positioning algorithm. The algorithm uses now the captured mouse coordinates instead of the panel's top/left coordinates.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/paneltooltip/PanelTooltip.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/javascript/extras/extras.js
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26132 Fri Oct 28 14:01:39 MDT 2011 mircea.toma ICE-7053 Pass in mouse coordinates in all ToolTipPanelPopupUtil.adjustPosition invocations.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/compat/core/src/main/javascript/extras/extras.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26133 Fri Oct 28 14:04:18 MDT 2011 mircea.toma ICE-7053 Pass in mouse coordinates in all ToolTipPanelPopupUtil.adjustPosition invocations.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/tooltip_panelpopup.js
        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.
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Ken Fyten made changes -
        Fix Version/s 2.1-Beta2 [ 10294 ]
        Ken Fyten made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Issue Type Bug [ 1 ] Improvement [ 4 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        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)
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #28738 Tue Apr 17 14:11:57 MDT 2012 mircea.toma ICE-7053 Use JDK 1.4 API to replace characters in strings.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/paneltooltip/PanelTooltip.java
        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.
        Mircea Toma made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1

          People

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

            Dates

            • Created:
              Updated:
              Resolved: