Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-12841

Tooltip: JavaScript Error with showDelay and partial update

    XMLWordPrintable

    Details

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      It seems, hiding the tooltip before the AJAX request is submitted prevents the script error

       <a4j:commandLink onclick="#{rich:component('tooltipid')}.hide()" ....)
      
      Show
      It seems, hiding the tooltip before the AJAX request is submitted prevents the script error <a4j:commandLink onclick= "#{rich:component( 'tooltipid' )}.hide()" ....)

      Description

      rich:tooltip causes script error when showDelay is used and the tooltip is updated due to a JSF request.

      Console log of Firefox:
      TypeError: tooltip.popup is null

      tooltip.popup.show(tooltip.saveShowEvent); in tooltip.js (line 245)

      The error comes in all browsers I tested with.

      
      <a4j:commandLink action="#{richTabMinimizer.toggle}" render="@this">
      	<h:graphicImage library="org.richfaces.images"
      		name="#{richTabMinimizer.expanded ? 'triangleUp.png' : 'triangleDown.png'}"/>
      						
      	<rich:tooltip followMouse="false" showDelay="1000">
      		#{richTabMinimizer.expanded ? 'close' : 'expand'}
      	</rich:tooltip>
      </a4j:commandLink>
      				
      
      

      (Its a stripped down example. The actual content of my tool-tip holds more text.)
      Note that my 'richTabMinimizer.toggle' bean toggles some GUI stuff and its property 'expanded' is switched from true to false and vice versa.
      You may probably replace it with anything to reproduce the error.

      Probably the tool-tip tries to show after the HTML elements have already been updated.
      It's no serious error. Nevertheless, its ugly.

      I guess it is not unusual to have a tool-tip (with a showDelay) on a command.
      But often, users will click the command just after the mouse entered the command.

      Maybe this issue report is a duplicate of RF-8652, but in contrast to 8652, I do not refer to open tooltips.

      For me, it would be sufficient if the script error is avoided.
      I do not expect the updated tooltip to show after the delay.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                michpetrov Michal Petrov
                Reporter:
                lutzulrich Lutz Ulrich
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: