jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Tooltip, Notification, Popover 'close' does not work during 'open' animation

This topic contains 2 replies, has 2 voices, and was last updated by  stephan 11 years, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author

  • stephan
    Participant

    Hi,

    At least that is my guess: it seems to me that calling ‘close’ while the ‘open’ animation is still ongoing will simply be ignored.

    Here’s a simple fiddle showing the problem:
    http://jsfiddle.net/_stephan_/TW79Z/3/

    In the fiddle there is no delay in between, but in my real app there actually is a short delay and event then it does not work.

    My real use case is this: I have writte “onmouseenter” and “onmouseleave” event handlers for my control and within these handlers i call “open” and “close” for the tooltip respectively. If I now move the mosue across the control very fast the tooltip will appear but will not disappear.

    Regards,
    Stephan


    Peter Stoev
    Keymaster

    Hi Stephan,

    You cannot close something which is still not opened. The “close” method should be used when the tooltip is already opened.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    stephan
    Participant

    Hi Peter,

    Well … you could close if right away despite its state. Animations can be aborted. Mainly I was hoping that you would understand the problem that results on the application side: If at the point in time where you definitely want to close the tooltip you do not know whether it has finished opening or not, it becomes difficult to actually close it …

    But I have now worked around the problem by reducing the times for opening and closing snimation. An alternative might have been to put the “close” call into a “setTimeout()”, but I didnt want to go down that route.

    Regards,
    stephan

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.