Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bug when nothing is selected when user clicks on dropdow slowly.

  • Loading branch information...
commit bcabbe081cf464611048489a5dedba8c07456b21 1 parent 2849aca
sarunas authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 typeahead.js
View
6 typeahead.js
@@ -276,7 +276,7 @@
this.$element.on('keydown', $.proxy(this.keypress, this))
this.$menu
- .on('click', $.proxy(this.click, this))
+ .on('mousedown', $.proxy(this.mousedown, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
},
@@ -335,12 +335,14 @@
blur: function (e) {
var that = this
setTimeout(function () { that.hide() }, 150)
+ console.log("blur")
},
- click: function (e) {
+ mousedown: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
+ console.log("click")
},
mouseenter: function (e) {
Please sign in to comment.
Something went wrong with that request. Please try again.