aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.tooltip.js
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-10-28 20:28:55 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-28 20:28:55 -0400
commitd074efe5289db4f5182a685046e9b9ad6186ac26 (patch)
treed659301eda82d13ef6edbb63ed2577e96a38716c /ui/jquery.ui.tooltip.js
parent9473ea71866e5eae1c0f242c0b88bb786aa4569b (diff)
downloadjquery-ui-d074efe5289db4f5182a685046e9b9ad6186ac26.tar.gz
jquery-ui-d074efe5289db4f5182a685046e9b9ad6186ac26.zip
Tooltip: Use attributes, not properties, when checking for parent tooltips. Fixes #8742 - Tooltip shows incorrect message in chrome if there is input with name='title' in a form.
Diffstat (limited to 'ui/jquery.ui.tooltip.js')
-rw-r--r--ui/jquery.ui.tooltip.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index f1f919ad3..c05be1d45 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -164,19 +164,20 @@ $.widget( "ui.tooltip", {
// kill parent tooltips, custom or native, for hover
if ( event && event.type === "mouseover" ) {
target.parents().each(function() {
- var blurEvent;
- if ( $( this ).data( "tooltip-open" ) ) {
+ var parent = $( this ),
+ blurEvent;
+ if ( parent.data( "tooltip-open" ) ) {
blurEvent = $.Event( "blur" );
blurEvent.target = blurEvent.currentTarget = this;
that.close( blurEvent, true );
}
- if ( this.title ) {
- $( this ).uniqueId();
+ if ( parent.attr( "title" ) ) {
+ parent.uniqueId();
that.parents[ this.id ] = {
element: this,
- title: this.title
+ title: parent.attr( "title" )
};
- this.title = "";
+ parent.attr( "title", "" );
}
});
}
@@ -334,7 +335,7 @@ $.widget( "ui.tooltip", {
if ( event && event.type === "mouseleave" ) {
$.each( this.parents, function( id, parent ) {
- parent.element.title = parent.title;
+ $( parent.element ).attr( "title", parent.title );
delete that.parents[ id ];
});
}