aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-10-12 20:26:47 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-12 20:26:47 -0400
commitbd3a348776bf50da53d17f1574efd5538ce9de4f (patch)
treeba9c13372c792dc285844b31d6c160fb8f19afbb
parent94221c4e5b11496ef927889e1541d84b5746fb31 (diff)
downloadjquery-ui-bd3a348776bf50da53d17f1574efd5538ce9de4f.tar.gz
jquery-ui-bd3a348776bf50da53d17f1574efd5538ce9de4f.zip
Tooltip: Change the default items selector to exclude disabled elements. Fixes #8661 - Tooltip doesn't hide on disabled anchor element [IE only].
-rw-r--r--tests/unit/tooltip/tooltip_common.js2
-rw-r--r--ui/jquery.ui.tooltip.js3
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/tooltip/tooltip_common.js b/tests/unit/tooltip/tooltip_common.js
index 6d503aecd..a4958ca9a 100644
--- a/tests/unit/tooltip/tooltip_common.js
+++ b/tests/unit/tooltip/tooltip_common.js
@@ -3,7 +3,7 @@ TestHelpers.commonWidgetTests( "tooltip", {
content: function() {},
disabled: false,
hide: true,
- items: "[title]",
+ items: "[title]:not([disabled])",
position: {
my: "left+15 center",
at: "right center",
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js
index 980b43868..0f69e898f 100644
--- a/ui/jquery.ui.tooltip.js
+++ b/ui/jquery.ui.tooltip.js
@@ -49,7 +49,8 @@ $.widget( "ui.tooltip", {
return $( this ).attr( "title" );
},
hide: true,
- items: "[title]",
+ // Disabled elements have inconsistent behavior across browsers (#8661)
+ items: "[title]:not([disabled])",
position: {
my: "left+15 center",
at: "right center",