From 5cf3f927a003566c690098c58a4c6c4a4729f12e Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Tue, 17 Apr 2012 09:56:20 +0200 Subject: Tooltip: Remove bad docs links from headers --- ui/jquery.ui.tooltip.js | 2 -- 1 file changed, 2 deletions(-) (limited to 'ui/jquery.ui.tooltip.js') diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 97895a6a8..424eca7af 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -5,8 +5,6 @@ * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * - * http://docs.jquery.com/UI/Tooltip - * * Depends: * jquery.ui.core.js * jquery.ui.widget.js -- cgit v1.2.3 From dbf31da79f30740136c2cb3b20269a7eabf9af67 Mon Sep 17 00:00:00 2001 From: Scott González Date: Mon, 30 Apr 2012 13:31:14 -0400 Subject: Tooltip: Only check if the element is active if the event that is causing the tooltip to close is not focusout. --- ui/jquery.ui.tooltip.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui/jquery.ui.tooltip.js') diff --git a/ui/jquery.ui.tooltip.js b/ui/jquery.ui.tooltip.js index 424eca7af..8ddcbb700 100644 --- a/ui/jquery.ui.tooltip.js +++ b/ui/jquery.ui.tooltip.js @@ -179,7 +179,10 @@ $.widget( "ui.tooltip", { // don't close if the element has focus // this prevents the tooltip from closing if you hover while focused - if ( !force && this.document[0].activeElement === target[0] ) { + // we have to check the event type because tabbing out of the document + // may leave the element as the activeElement + if ( !force && event && event.type !== "focusout" && + this.document[0].activeElement === target[0] ) { return; } -- cgit v1.2.3 From 653673ed64176645128782038e0ee99c05514b92 Mon Sep 17 00:00:00 2001 From: Jörn Zaefferer Date: Wed, 9 May 2012 18:24:47 +0200 Subject: Tooltip: Fix the accessible properties IE exposes --- ui/jquery.ui.tooltip.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'ui/jquery.ui.tooltip.js') 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 -- cgit v1.2.3