summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Zamir <brettz9@yahoo.com>2014-06-11 10:41:52 +0800
committerBrett Zamir <brettz9@yahoo.com>2014-06-11 10:41:52 +0800
commit6aaeffb3ee9273183c342bd9021a46181b06eeae (patch)
tree535a640efb47a8f2b877459d2040c2854fc38b91
parentaddbc3d95eff3aaadf229ffff869517d0b6e2657 (diff)
parent3a03ddaf93ba1833438358baa0dbf0658452417e (diff)
downloadmultiple-select-6aaeffb3ee9273183c342bd9021a46181b06eeae.zip
multiple-select-6aaeffb3ee9273183c342bd9021a46181b06eeae.tar.gz
multiple-select-6aaeffb3ee9273183c342bd9021a46181b06eeae.tar.bz2
Merge branch 'master' of https://github.com/wenzhixin/multiple-select.git
-rw-r--r--jquery.multiple.select.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jquery.multiple.select.js b/jquery.multiple.select.js
index 95269c0..bc20706 100644
--- a/jquery.multiple.select.js
+++ b/jquery.multiple.select.js
@@ -171,7 +171,11 @@
break;
}
});
- this.$searchInput.off('keyup').on('keyup', function(e) {
+ this.$searchInput.off('keydown').on('keydown', function (e) {
+ if (e.keyCode === 9 && e.shiftKey) { // Ensure shift-tab causes lost focus from filter as with clicking away
+ that.close();
+ }
+ }).off('keyup').on('keyup', function(e) {
if (that.options.filterAcceptOnEnter &&
(e.which === 13 || e.which == 32) && // enter or space
that.$searchInput.val() // Avoid selecting/deselecting if no choices made