Tooltip: Document why we don't use removeAttr

This commit is contained in:
Jörn Zaefferer 2012-02-19 21:17:35 +01:00
parent e2ca906141
commit daacbaf221

View File

@ -123,7 +123,10 @@ $.widget( "ui.tooltip", {
// if we have a title, clear it to prevent the native tooltip // if we have a title, clear it to prevent the native 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])
// TODO: document why we don't use .removeAttr()
// 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.
if ( target.is( "[title]" ) ) { if ( target.is( "[title]" ) ) {
target.attr( "title", "" ); target.attr( "title", "" );
} }