Skip to content

Commit

Permalink
Merge pull request #297 from railsonrdr/master
Browse files Browse the repository at this point in the history
Blur with click trigger autoSelect and show all options on clear
  • Loading branch information
bassjobsen authored Oct 5, 2017
2 parents 4d9b9af + bcb9daa commit 10ef04d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bootstrap3-typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
if (typeof(query) != 'undefined' && query !== null) {
this.query = query;
} else {
this.query = this.$element.val() || this.$element.text() || '';
this.query = this.$element.val();
}

if (this.query.length < this.options.minLength && !this.options.showHintOnFocus) {
Expand Down Expand Up @@ -533,6 +533,7 @@

blur: function (e) {
if (!this.mousedover && !this.mouseddown && this.shown) {
this.select();
this.hide();
this.focused = false;
this.keyPressed = false;
Expand Down

0 comments on commit 10ef04d

Please sign in to comment.