Skip to content

Commit

Permalink
Change hint input from disabled to readonly. Closes #839.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Harding committed Jul 9, 2014
1 parent bd8f259 commit be9114d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var Typeahead = (function() {
this.isActivated = false;
this.autoselect = !!o.autoselect;
this.minLength = _.isNumber(o.minLength) ? o.minLength : 1;
this.$node = buildDomStructure(o.input, o.withHint);
this.$node = buildDom(o.input, o.withHint);

$menu = this.$node.find('.tt-dropdown-menu');
$input = this.$node.find('.tt-input');
Expand Down Expand Up @@ -318,7 +318,7 @@ var Typeahead = (function() {

return Typeahead;

function buildDomStructure(input, withHint) {
function buildDom(input, withHint) {
var $input, $wrapper, $dropdown, $hint;

$input = $(input);
Expand All @@ -331,8 +331,8 @@ var Typeahead = (function() {
.removeData()
.addClass('tt-hint')
.removeAttr('id name placeholder required')
.prop('disabled', true)
.attr({ autocomplete: 'off', spellcheck: 'false' });
.prop('readonly', true)
.attr({ autocomplete: 'off', spellcheck: 'false', tabindex: -1 });

// store the original values of the attrs that get modified
// so modifications can be reverted on destroy
Expand Down

0 comments on commit be9114d

Please sign in to comment.