|
|
@ -144,7 +144,16 @@ $.fn.search = function(parameters) { |
|
|
|
event: { |
|
|
|
input: function() { |
|
|
|
clearTimeout(module.timer); |
|
|
|
module.timer = setTimeout(module.query, settings.searchDelay); |
|
|
|
if(settings.searchDelay) { |
|
|
|
module.timer = setTimeout(function() { |
|
|
|
if(module.is.focused()) { |
|
|
|
module.query(); |
|
|
|
} |
|
|
|
}, settings.searchDelay); |
|
|
|
} |
|
|
|
else { |
|
|
|
module.query(); |
|
|
|
} |
|
|
|
}, |
|
|
|
focus: function() { |
|
|
|
module.set.focus(); |
|
|
|