Commit 43765403 authored by fat's avatar fat

focus on escape in typeahead

parent 10e72e15
...@@ -53,9 +53,10 @@ ...@@ -53,9 +53,10 @@
if (!isActive) { if (!isActive) {
$parent.toggleClass('open') $parent.toggleClass('open')
$this.focus()
} }
$this.focus()
return false return false
} }
......
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
} }
, keydown: function (e) { , keydown: function (e) {
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27]) this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e) this.move(e)
} }
......
...@@ -664,9 +664,10 @@ ...@@ -664,9 +664,10 @@
if (!isActive) { if (!isActive) {
$parent.toggleClass('open') $parent.toggleClass('open')
$this.focus()
} }
$this.focus()
return false return false
} }
...@@ -1935,7 +1936,7 @@ ...@@ -1935,7 +1936,7 @@
} }
, keydown: function (e) { , keydown: function (e) {
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27]) this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
this.move(e) this.move(e)
} }
......
This diff is collapsed.
...@@ -53,9 +53,10 @@ ...@@ -53,9 +53,10 @@
if (!isActive) { if (!isActive) {
$parent.toggleClass('open') $parent.toggleClass('open')
$this.focus()
} }
$this.focus()
return false return false
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment