Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Fixed unfocus hoverIntent bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Apr 28, 2011
1 parent 331ffe4 commit 86580cd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Wed Apr 27 01:02:12 2011 +0100
* Date: Wed Apr 27 14:45:16 2011 +0100
*/

/* Fluid class for determining actual width in IE */
Expand Down
10 changes: 6 additions & 4 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Wed Apr 27 01:02:12 2011 +0100
* Date: Wed Apr 27 14:45:16 2011 +0100
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -1566,10 +1566,12 @@ QTIP.bind = function(opts, event)
};

/*
* If hide event is just 'unfocus', we'll use mouseleave as the hide event...
* since unfocus is actually library specific and won't fire as an event anywho.
* Make sure hoverIntent functions properly by using mouseleave as a hide event if
* mouseenter/mouseout is used for show.event, even if it isn't in the users options.
*/
if(options.hide.event === 'unfocus') { events.hide = 'mouseleave' + namespace; }
if(/mouse(over|enter)/i.test(events.show) && !/mouse(out|leave)/i.test(events.hide)) {
events.hide += ' mouseleave' + namespace;
}

// Define hoverIntent function
function hoverIntent(event) {
Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.pack.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions src/core.js
Expand Up @@ -1523,10 +1523,12 @@ QTIP.bind = function(opts, event)
};

/*
* If hide event is just 'unfocus', we'll use mouseleave as the hide event...
* since unfocus is actually library specific and won't fire as an event anywho.
* Make sure hoverIntent functions properly by using mouseleave as a hide event if
* mouseenter/mouseout is used for show.event, even if it isn't in the users options.
*/
if(options.hide.event === 'unfocus') { events.hide = 'mouseleave' + namespace; }
if(/mouse(over|enter)/i.test(events.show) && !/mouse(out|leave)/i.test(events.hide)) {
events.hide += ' mouseleave' + namespace;
}

// Define hoverIntent function
function hoverIntent(event) {
Expand Down

0 comments on commit 86580cd

Please sign in to comment.