Skip to content

Commit 4376540

Browse files
committed
focus on escape in typeahead
1 parent 10e72e1 commit 4376540

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

docs/assets/js/bootstrap-dropdown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@
5353

5454
if (!isActive) {
5555
$parent.toggleClass('open')
56-
$this.focus()
5756
}
5857

58+
$this.focus()
59+
5960
return false
6061
}
6162

docs/assets/js/bootstrap-typeahead.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217
}
218218

219219
, keydown: function (e) {
220-
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
220+
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
221221
this.move(e)
222222
}
223223

docs/assets/js/bootstrap.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -664,9 +664,10 @@
664664

665665
if (!isActive) {
666666
$parent.toggleClass('open')
667-
$this.focus()
668667
}
669668

669+
$this.focus()
670+
670671
return false
671672
}
672673

@@ -1935,7 +1936,7 @@
19351936
}
19361937

19371938
, keydown: function (e) {
1938-
this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
1939+
this.suppressKeyPressRepeat = ~$.inArray(e.keyCode, [40,38,9,13,27])
19391940
this.move(e)
19401941
}
19411942

docs/assets/js/bootstrap.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/bootstrap-dropdown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@
5353

5454
if (!isActive) {
5555
$parent.toggleClass('open')
56-
$this.focus()
5756
}
5857

58+
$this.focus()
59+
5960
return false
6061
}
6162

0 commit comments

Comments
 (0)