0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 16:54:24 +01:00

focus on escape in typeahead

This commit is contained in:
fat 2012-12-07 18:37:32 -05:00
parent 10e72e158d
commit 437654030a
5 changed files with 9 additions and 6 deletions

View File

@ -53,9 +53,10 @@
if (!isActive) {
$parent.toggleClass('open')
$this.focus()
}
$this.focus()
return false
}

View File

@ -217,7 +217,7 @@
}
, 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)
}

View File

@ -664,9 +664,10 @@
if (!isActive) {
$parent.toggleClass('open')
$this.focus()
}
$this.focus()
return false
}
@ -1935,7 +1936,7 @@
}
, 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)
}

File diff suppressed because one or more lines are too long

View File

@ -53,9 +53,10 @@
if (!isActive) {
$parent.toggleClass('open')
$this.focus()
}
$this.focus()
return false
}