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

Commit

Permalink
Further hoverIntent fix for unfocus
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Apr 28, 2011
1 parent 86580cd commit 6a51bc5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 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 14:45:16 2011 +0100
* Date: Thu Apr 28 13:47:27 2011 +0100
*/

/* Fluid class for determining actual width in IE */
Expand Down
12 changes: 10 additions & 2 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 14:45:16 2011 +0100
* Date: Thu Apr 28 13:47:27 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 @@ -395,6 +395,14 @@ function QTip(target, options, id, attr)
IE6 = $.browser.msie && parseInt($.browser.version, 10) === 6,
additional;

/*
* 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(/mouse(over|enter)/i.test(options.show.event) && !/mouse(out|leave)/i.test(options.hide.event)) {
events.hide.push('mouseleave');
}

// Define show event method
function showMethod(event)
{
Expand Down Expand Up @@ -1564,7 +1572,7 @@ QTIP.bind = function(opts, event)
show: $.trim('' + options.show.event).replace(/ /g, namespace+' ') + namespace,
hide: $.trim('' + options.hide.event).replace(/ /g, namespace+' ') + namespace
};

/*
* 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.
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.

10 changes: 9 additions & 1 deletion src/core.js
Expand Up @@ -352,6 +352,14 @@ function QTip(target, options, id, attr)
IE6 = $.browser.msie && parseInt($.browser.version, 10) === 6,
additional;

/*
* 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(/mouse(over|enter)/i.test(options.show.event) && !/mouse(out|leave)/i.test(options.hide.event)) {
events.hide.push('mouseleave');
}

// Define show event method
function showMethod(event)
{
Expand Down Expand Up @@ -1521,7 +1529,7 @@ QTIP.bind = function(opts, event)
show: $.trim('' + options.show.event).replace(/ /g, namespace+' ') + namespace,
hide: $.trim('' + options.hide.event).replace(/ /g, namespace+' ') + namespace
};

/*
* 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.
Expand Down

0 comments on commit 6a51bc5

Please sign in to comment.