Browse Source

Fix search results close when change browser tab

pull/1698/merge
jlukic 9 years ago
parent
commit
913aa7744f
1 changed files with 6 additions and 6 deletions
  1. 12
      src/definitions/modules/search.js

12
src/definitions/modules/search.js

@ -117,11 +117,12 @@ $.fn.search = function(parameters) {
} }
}, },
blur: function(event) { 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); module.timer = setTimeout(module.hideResults, settings.hideDelay);
} }
}, },
@ -262,7 +263,6 @@ $.fn.search = function(parameters) {
apiSettings = { apiSettings = {
on : false, on : false,
action : 'search', action : 'search',
debug : settings.debug,
onFailure : module.error onFailure : module.error
}, },
searchHTML searchHTML
@ -714,7 +714,7 @@ $.fn.search.settings = {
name : 'Search Module', name : 'Search Module',
namespace : 'search', namespace : 'search',
debug : true,
debug : false,
verbose : true, verbose : true,
performance : true, performance : true,

Loading…
Cancel
Save