Skip to content

Commit bd3a348

Browse files
committed
Tooltip: Change the default items selector to exclude disabled elements. Fixes #8661 - Tooltip doesn't hide on disabled anchor element [IE only].
1 parent 94221c4 commit bd3a348

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tests/unit/tooltip/tooltip_common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ TestHelpers.commonWidgetTests( "tooltip", {
33
content: function() {},
44
disabled: false,
55
hide: true,
6-
items: "[title]",
6+
items: "[title]:not([disabled])",
77
position: {
88
my: "left+15 center",
99
at: "right center",

ui/jquery.ui.tooltip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ $.widget( "ui.tooltip", {
4949
return $( this ).attr( "title" );
5050
},
5151
hide: true,
52-
items: "[title]",
52+
// Disabled elements have inconsistent behavior across browsers (#8661)
53+
items: "[title]:not([disabled])",
5354
position: {
5455
my: "left+15 center",
5556
at: "right center",

0 commit comments

Comments
 (0)