mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-11 18:02:28 +03:00
Allow events to propagate / default if not used.
- All key events when the menu is not shown now propagate. - Blur is also allowed to propagate.
This commit is contained in:
Vendored
+4
-6
@@ -165,9 +165,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
, keyup: function (e) {
|
, keyup: function (e) {
|
||||||
e.stopPropagation()
|
|
||||||
e.preventDefault()
|
|
||||||
|
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
case 40: // down arrow
|
case 40: // down arrow
|
||||||
case 38: // up arrow
|
case 38: // up arrow
|
||||||
@@ -187,10 +184,11 @@
|
|||||||
this.lookup()
|
this.lookup()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
e.preventDefault()
|
||||||
}
|
}
|
||||||
|
|
||||||
, keypress: function (e) {
|
, keypress: function (e) {
|
||||||
e.stopPropagation()
|
|
||||||
if (!this.shown) return
|
if (!this.shown) return
|
||||||
|
|
||||||
switch(e.keyCode) {
|
switch(e.keyCode) {
|
||||||
@@ -210,12 +208,12 @@
|
|||||||
this.next()
|
this.next()
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
}
|
}
|
||||||
|
|
||||||
, blur: function (e) {
|
, blur: function (e) {
|
||||||
var that = this
|
var that = this
|
||||||
e.stopPropagation()
|
|
||||||
e.preventDefault()
|
|
||||||
setTimeout(function () { that.hide() }, 150)
|
setTimeout(function () { that.hide() }, 150)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user