Search and Top Navigation
#8646 closed bug (fixed)
Opened October 10, 2012 08:40AM UTC
Closed October 21, 2012 05:31PM UTC
Last modified November 09, 2012 04:13PM UTC
Tooltip: Delegated tooltips don't close when the tooltipped element is removed
Reported by: | josepsanzcamp | Owned by: | acouch |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.1 |
Component: | ui.tooltip | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
I have a page that contain some elements with title attribute and the tooltip works as expected, but sometimes, when I replace the content that contain the tooltip launcher between the show and hide event, the hide event never is executed and the tooltip is attached to the screen. Currently, I hide all .ui-tooltip elements to prevent this issue when I replace the content.
Attachments (0)
Change History (17)
Changed October 10, 2012 12:10PM UTC by comment:1
owner: | → josepsanzcamp |
---|---|
status: | new → pending |
Changed October 12, 2012 01:48PM UTC by comment:2
I am seeing the same issue, here is a reduced test case:
Changed October 12, 2012 02:31PM UTC by comment:3
status: | pending → open |
---|
I had a feeling this was about delegated tooltips. Perhaps we can bind temporary remove event handlers for open delegated tooltips.
Changed October 12, 2012 02:31PM UTC by comment:4
summary: | Tooltip never close when the launcher object is replaced. → Tooltip: Delegated tooltips don't close when the tooltipped element is removed |
---|
Changed October 15, 2012 03:22PM UTC by comment:5
owner: | josepsanzcamp → acouch |
---|---|
status: | open → assigned |
Changed October 15, 2012 08:23PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | assigned → closed |
binding a remove event handler fixes the issue.
https://github.com/couchand/jquery-ui/commit/c0c14d1ac7d26792b34e30dbed9e41735ac3e5cd
Changed October 15, 2012 08:35PM UTC by comment:7
_comment0: | Stupid track, that commit didn't land yet. → 1350333423931232 |
---|
Stupid trac, that commit didn't land yet.
Changed October 15, 2012 08:37PM UTC by comment:8
resolution: | fixed |
---|---|
status: | closed → reopened |
Changed October 15, 2012 08:37PM UTC by comment:9
status: | reopened → open |
---|
Or did acouch just close the ticket manually? Can't tell.
Changed October 15, 2012 09:19PM UTC by comment:10
yes, manually closed per suggestion from another at my table.
it's in pull request https://github.com/jquery/jquery-ui/pull/751
Changed October 16, 2012 12:25PM UTC by comment:11
#8683 is a duplicate of this ticket.
Changed October 16, 2012 03:21PM UTC by comment:12
How is this a minor priority? It makes tooltips useless if you want to use an AJAX call to load the data. Is there currently a known work around?
Changed October 16, 2012 03:41PM UTC by comment:13
@dsargent - from the op: "Currently, I hide all .ui-tooltip elements to prevent this issue when I replace the content."
They could also be safely removed with a simple $( ".ui-tooltip" ).remove() just before or after replacing the content.
Changed October 17, 2012 05:37PM UTC by comment:14
Doesn't help.
My problem may not be completely related to this bug, but I'm not sure.
In my case I have tooltips attached to links in a dialog, the contents of the tooltip are being populated via an AJAX call, if you click the link it does not fire an event (return false) but this causes the tooltip to stay open.
I've added your suggestion to the close event of the dialog box, if you then close the dialog box the tooltip disappears and then reappears in the top right corner of the screen with a different ID. Something is recreating the silly things!
I've also tried: $('.ui-tooltip').hide();
$('.ui-tooltip').tooltip('destroy');
etc.
No matter what I do in the dialog close event, the tooltip is recreated a split second after the dialog closes . . .
I've replicated this with jsFiddle here
To make it happen do the following.
Hover over the link in the dialog, the tooltip should appear.
Press Escape key on the keybaord to close the dialog.
Note: I've discovered the hide animation seems to be helping to cause the problem.
Any clue on how I can fix this short term. If I had hair I'd be pulling it out about now :)
Replying to [comment:13 acouch]:
@dsargent - from the op: "Currently, I hide all .ui-tooltip elements to prevent this issue when I replace the content." They could also be safely removed with a simple $( ".ui-tooltip" ).remove() just before or after replacing the content.
Changed October 20, 2012 12:02AM UTC by comment:15
#8704 is a duplicate of this ticket.
Changed October 21, 2012 05:31PM UTC by comment:16
resolution: | → fixed |
---|---|
status: | open → closed |
Tooltip: handle removal of elements with delegated tooltips. Fixed #8646 - Delegated tooltips don't close when the tooltipped element is removed
Changeset: 3b2d1e7736be99671af70aa3b775d67b917517e5
Changed November 09, 2012 04:13PM UTC by comment:17
I was able to get rid of the issue by upgrading jQuery UI to 1.9.1.
Replying to [comment:14 dsargent@…]
Please provide a reduced test case showin the situation that you're describing.