summaryrefslogtreecommitdiffstats
path: root/jquery.multiple.select.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery.multiple.select.js')
-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