aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tooltip.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-14 14:14:25 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-14 14:14:45 -0500
commit1b503a237e1dc47739a8a451debbc86e169851e3 (patch)
tree75dc0f90353937dc72cf3c26d00bc310bba5037e /ui/jquery.ui.tooltip.js
parenteca5abd873675f5cc7b96641c723b7e35a4260bc (diff)
downloadjquery-ui-1b503a237e1dc47739a8a451debbc86e169851e3.tar.gz
jquery-ui-1b503a237e1dc47739a8a451debbc86e169851e3.zip
Tooltip: Handle synthetic focusin events. Fixes #8740 - Tooltip: Does not hide consistently with dynamically loaded content.
Diffstat (limited to 'ui/jquery.ui.tooltip.js')
-rw-r--r--ui/jquery.ui.tooltip.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index e5b496bee..ffffe1981 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -188,7 +188,8 @@ $.widget( "ui.tooltip", {
_updateContent: function( target, event ) {
var content,
contentOption = this.options.content,
- that = this;
+ that = this,
+ eventType = event ? event.type : null;
if ( typeof contentOption === "string" ) {
return this._open( event, target, contentOption );
@@ -202,6 +203,14 @@ $.widget( "ui.tooltip", {
// IE may instantly serve a cached response for ajax requests
// delay this call to _open so the other call to _open runs first
that._delay(function() {
+ // jQuery creates a special event for focusin when it doesn't
+ // exist natively. To improve performance, the native event
+ // object is reused and the type is changed. Therefore, we can't
+ // rely on the type being correct after the event finished
+ // bubbling, so we set it back to the previous value. (#8740)
+ if ( event ) {
+ event.type = eventType;
+ }
this._open( event, target, response );
});
});