Skip to content

Commit

Permalink
Fix search results close when change browser tab
Browse files Browse the repository at this point in the history
  • Loading branch information
jlukic committed Jan 20, 2015
1 parent 5f18f2c commit 913aa77
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/definitions/modules/search.js
Expand Up @@ -117,11 +117,12 @@ $.fn.search = function(parameters) {
}
},
blur: function(event) {
module.cancel();
$module
.removeClass(className.focus)
var
pageLostFocus = (document.activeElement === this)
;
if(!module.resultsClicked) {
if(!pageLostFocus && !module.resultsClicked) {
module.cancel();
$module.removeClass(className.focus);
module.timer = setTimeout(module.hideResults, settings.hideDelay);
}
},
Expand Down Expand Up @@ -262,7 +263,6 @@ $.fn.search = function(parameters) {
apiSettings = {
on : false,
action : 'search',
debug : settings.debug,
onFailure : module.error
},
searchHTML
Expand Down Expand Up @@ -714,7 +714,7 @@ $.fn.search.settings = {
name : 'Search Module',
namespace : 'search',

debug : true,
debug : false,
verbose : true,
performance : true,

Expand Down

0 comments on commit 913aa77

Please sign in to comment.