Browse Source

Fix searchdelay could make results appear even after search has lost focus

pull/5242/head
Jack Lukic 7 years ago
parent
commit
2a53a9fbd0
2 changed files with 16 additions and 1 deletions
  1. 6
      RELEASE-NOTES.md
  2. 11
      src/definitions/modules/search.js

6
RELEASE-NOTES.md

@ -1,5 +1,11 @@
## RELEASE NOTES
### Version 2.2.11 - March 28, 2017
**Bugs**
- **Search** - Fixed issue where `searchDelay` could cause results to appear after search had lost focus.
- **Sticky** - Fix issue where sticky would cause page to shift when `context` height was determined by sticky's height in `position: static;` #3430
### Version 2.2.10 - March 28, 2017
**Critical Bugs**

11
src/definitions/modules/search.js

@ -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();

Loading…
Cancel
Save