mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Tooltip: Fix the accessible properties IE exposes
This commit is contained in:
parent
a1b9fbfe75
commit
653673ed64
10
ui/jquery.ui.tooltip.js
vendored
10
ui/jquery.ui.tooltip.js
vendored
@ -128,11 +128,15 @@ $.widget( "ui.tooltip", {
|
|||||||
// we have to check first to avoid defining a title if none exists
|
// we have to check first to avoid defining a title if none exists
|
||||||
// (we don't want to cause an element to start matching [title])
|
// (we don't want to cause an element to start matching [title])
|
||||||
|
|
||||||
// We don't use removeAttr as that causes the native tooltip to show
|
// We use removeAttr only for key events, to allow IE to export the correct
|
||||||
// up in IE (9 and below, didn't yet test 10). Happens only when removing
|
// accessible attributes. For mouse events, set to empty string to avoid
|
||||||
// inside the mouseover handler.
|
// native tooltip showing up (happens only when removing inside mouseover).
|
||||||
if ( target.is( "[title]" ) ) {
|
if ( target.is( "[title]" ) ) {
|
||||||
|
if ( event && event.type === "mouseover" ) {
|
||||||
target.attr( "title", "" );
|
target.attr( "title", "" );
|
||||||
|
} else {
|
||||||
|
target.removeAttr( "title" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ajaxy tooltip can update an existing one
|
// ajaxy tooltip can update an existing one
|
||||||
|
Loading…
Reference in New Issue
Block a user