Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Commit

Permalink
fix(tagsInput): Ensure autocomplete attribute is off
Browse files Browse the repository at this point in the history
Ensure the inner input's autocomplete attribute is set to 'off' so the
browser autofill system doesn't get activated.

Closes #368
  • Loading branch information
mbenford committed Mar 13, 2015
1 parent 0bfc7ee commit 8359e60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions templates/tags-input.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</li>
</ul>
<input class="input"
autocomplete="off"
ng-model="newTag.text"
ng-change="eventHandlers.input.change(newTag.text)"
ng-keydown="eventHandlers.input.keydown($event)"
Expand Down
8 changes: 8 additions & 0 deletions test/tags-input.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ describe('tags-input directive', function() {
// Assert
expect($scope.form.tags.$dirty).toBe(true);
});

it('sets the input\'s autocomplete attribute to off', function() {
// Arrange/Act
compile();

// Assert
expect(getInput().attr('autocomplete')).toBe('off');
});
});

describe('focus outline', function() {
Expand Down

0 comments on commit 8359e60

Please sign in to comment.