diff options
Diffstat (limited to 'xstatic/pkg/jquery_ui/data/ui/jquery.ui.tooltip.js')
-rw-r--r-- | xstatic/pkg/jquery_ui/data/ui/jquery.ui.tooltip.js | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/xstatic/pkg/jquery_ui/data/ui/jquery.ui.tooltip.js b/xstatic/pkg/jquery_ui/data/ui/jquery.ui.tooltip.js index 2b50b44..452b564 100644 --- a/xstatic/pkg/jquery_ui/data/ui/jquery.ui.tooltip.js +++ b/xstatic/pkg/jquery_ui/data/ui/jquery.ui.tooltip.js @@ -1,8 +1,8 @@ /*! - * jQuery UI Tooltip 1.9.2 + * jQuery UI Tooltip 1.10.4 * http://jqueryui.com * - * Copyright 2012 jQuery Foundation and other contributors + * Copyright 2014 jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * @@ -43,10 +43,14 @@ function removeDescribedBy( elem ) { } $.widget( "ui.tooltip", { - version: "1.9.2", + version: "1.10.4", options: { content: function() { - return $( this ).attr( "title" ); + // support: IE<9, Opera in jQuery <1.7 + // .text() can't accept undefined, so coerce to a string + var title = $( this ).attr( "title" ) || ""; + // Escape title, since we're going from an attribute to raw HTML + return $( "<a>" ).text( title ).html(); }, hide: true, // Disabled elements have inconsistent behavior across browsers (#8661) @@ -111,7 +115,7 @@ $.widget( "ui.tooltip", { }); // remove title attributes to prevent native tooltips - this.element.find( this.options.items ).andSelf().each(function() { + this.element.find( this.options.items ).addBack().each(function() { var element = $( this ); if ( element.is( "[title]" ) ) { element @@ -123,7 +127,7 @@ $.widget( "ui.tooltip", { _enable: function() { // restore title attributes - this.element.find( this.options.items ).andSelf().each(function() { + this.element.find( this.options.items ).addBack().each(function() { var element = $( this ); if ( element.data( "ui-tooltip-title" ) ) { element.attr( "title", element.data( "ui-tooltip-title" ) ); @@ -268,7 +272,7 @@ $.widget( "ui.tooltip", { // as the tooltip is visible, position the tooltip using the most recent // event. if ( this.options.show && this.options.show.delay ) { - delayedShow = setInterval(function() { + delayedShow = this.delayedShow = setInterval(function() { if ( tooltip.is( ":visible" ) ) { position( positionOption.of ); clearInterval( delayedShow ); @@ -310,6 +314,9 @@ $.widget( "ui.tooltip", { return; } + // Clear the interval for delayed tracking tooltips + clearInterval( this.delayedShow ); + // only set title if we had one before (see comment in _open()) if ( target.data( "ui-tooltip-title" ) ) { target.attr( "title", target.data( "ui-tooltip-title" ) ); @@ -355,9 +362,6 @@ $.widget( "ui.tooltip", { .addClass( "ui-tooltip-content" ) .appendTo( tooltip ); tooltip.appendTo( this.document[0].body ); - if ( $.fn.bgiframe ) { - tooltip.bgiframe(); - } this.tooltips[ id ] = element; return tooltip; }, |