2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-20 20:00:36 +03:00
This commit is contained in:
Jacob Thornton
2012-03-08 11:39:50 -08:00
parent d3721c504e
commit af1dbf6581
2 changed files with 6 additions and 6 deletions
Binary file not shown.
+6 -6
View File
@@ -40,6 +40,7 @@
, select: function () { , select: function () {
var val = this.$menu.find('.active').attr('data-value') var val = this.$menu.find('.active').attr('data-value')
this.$element.val(val) this.$element.val(val)
this.$element.change();
return this.hide() return this.hide()
} }
@@ -165,9 +166,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
@@ -180,6 +178,7 @@
break break
case 27: // escape case 27: // escape
if (!this.shown) return
this.hide() this.hide()
break break
@@ -187,10 +186,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 +210,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)
} }