Skip to content

Commit 37a5268

Browse files
committed
Reordered session reset in hideTip().
Fixes (or at least improves) edge case where hideTip() can be queued immediately after showTip() during an instant cursor relocation to another element with a tooltip, causing session reset code to be called on an open tooltip.
1 parent 569a811 commit 37a5268

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

jquery.powertip.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,13 @@
237237
*/
238238
function hideTip(element) {
239239
element.data('hasActiveHover', false);
240+
// reset session
241+
session.activeHover = null;
242+
session.isPopOpen = false;
243+
// stop desync polling
244+
session.desyncTimeout = clearInterval(session.desyncTimeout);
245+
// fade out
240246
tipElement.fadeOut(options.fadeOutTime, function() {
241-
session.activeHover = null;
242-
session.isPopOpen = false;
243247
session.isFixedPopOpen = false;
244248
tipElement.removeClass();
245249
// support mouse-follow and fixed position pops at the same
@@ -249,8 +253,6 @@
249253
session.currentX + options.offset,
250254
session.currentY + options.offset
251255
);
252-
// stop desync polling
253-
session.desyncTimeout = clearInterval(session.desyncTimeout);
254256
});
255257
}
256258

0 commit comments

Comments
 (0)