File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -128,11 +128,15 @@ $.widget( "ui.tooltip", {
128
128
// we have to check first to avoid defining a title if none exists
129
129
// (we don't want to cause an element to start matching [title])
130
130
131
- // We don't use removeAttr as that causes the native tooltip to show
132
- // up in IE (9 and below, didn't yet test 10). Happens only when removing
133
- // inside the mouseover handler .
131
+ // We use removeAttr only for key events, to allow IE to export the correct
132
+ // accessible attributes. For mouse events, set to empty string to avoid
133
+ // native tooltip showing up (happens only when removing inside mouseover) .
134
134
if ( target . is ( "[title]" ) ) {
135
- target . attr ( "title" , "" ) ;
135
+ if ( event && event . type === "mouseover" ) {
136
+ target . attr ( "title" , "" ) ;
137
+ } else {
138
+ target . removeAttr ( "title" ) ;
139
+ }
136
140
}
137
141
138
142
// ajaxy tooltip can update an existing one
You can’t perform that action at this time.
0 commit comments