diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-05-09 18:24:47 +0200 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2012-05-09 18:26:19 +0200 |
commit | 653673ed64176645128782038e0ee99c05514b92 (patch) | |
tree | fcc04cf1a3e2e6751c817f6ec0e65734603780f8 /ui | |
parent | a1b9fbfe7539b9c457357c73f5bddf1484844811 (diff) | |
download | jquery-ui-653673ed64176645128782038e0ee99c05514b92.tar.gz jquery-ui-653673ed64176645128782038e0ee99c05514b92.zip |
Tooltip: Fix the accessible properties IE exposes
Diffstat (limited to 'ui')
-rw-r--r-- | ui/jquery.ui.tooltip.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 8ddcbb700..47a377bfd 100644 --- a/ui/jquery.ui.tooltip.js +++ b/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 |