Skip to content
Permalink
Browse files

Tooltip: Fix the accessible properties IE exposes

  • Loading branch information
jzaefferer committed May 9, 2012
1 parent a1b9fbf commit 653673ed64176645128782038e0ee99c05514b92
Showing with 8 additions and 4 deletions.
  1. +8 −4 ui/jquery.ui.tooltip.js
@@ -128,11 +128,15 @@ $.widget( "ui.tooltip", {
// 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 use removeAttr as that causes the native tooltip to show
// up in IE (9 and below, didn't yet test 10). Happens only when removing
// inside the mouseover handler.
// We use removeAttr only for key events, to allow IE to export the correct
// accessible attributes. For mouse events, set to empty string to avoid
// native tooltip showing up (happens only when removing inside mouseover).
if ( target.is( "[title]" ) ) {
target.attr( "title", "" );
if ( event && event.type === "mouseover" ) {
target.attr( "title", "" );
} else {
target.removeAttr( "title" );
}
}

// ajaxy tooltip can update an existing one

0 comments on commit 653673e

Please sign in to comment.
You can’t perform that action at this time.