diff --git a/src/typeahead/test/typeahead.spec.js b/src/typeahead/test/typeahead.spec.js index 6a06638dd9..f4d1806f14 100644 --- a/src/typeahead/test/typeahead.spec.js +++ b/src/typeahead/test/typeahead.spec.js @@ -1211,6 +1211,11 @@ describe('typeahead tests', function() { triggerKeyDown(element, 27); expect(hintEl.val()).toEqual(''); }); + + it("should set tab index on hint input element", function(){ + var hintEl = findInput(element); + expect(hintEl.attr('tabindex')).toEqual('-1'); + }); }); describe('append to', function() { diff --git a/src/typeahead/typeahead.js b/src/typeahead/typeahead.js index 6cf678b40a..2b94f0666a 100644 --- a/src/typeahead/typeahead.js +++ b/src/typeahead/typeahead.js @@ -129,6 +129,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.debounce', 'ui.bootstrap element.after(inputsContainer); hintInputElem = element.clone(); hintInputElem.attr('placeholder', ''); + hintInputElem.attr('tabindex', '-1'); hintInputElem.val(''); hintInputElem.css({ 'position': 'absolute',