Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(typeahead): Fix tab index for hint input #5492

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/typeahead/test/typeahead.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down