mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-22 01:10:23 +00:00
fix(input): recognize 'password' as an html input type
This commit is contained in:
parent
8978e066b5
commit
e82e64d57b
2 changed files with 9 additions and 1 deletions
|
|
@ -579,7 +579,7 @@ function numericRegexpInputType(regexp, error) {
|
|||
|
||||
var HTML5_INPUTS_TYPES = makeMap(
|
||||
"search,tel,url,email,datetime,date,month,week,time,datetime-local,number,range,color," +
|
||||
"radio,checkbox,text,button,submit,reset,hidden");
|
||||
"radio,checkbox,text,button,submit,reset,hidden,password");
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -405,6 +405,14 @@ describe('widget: input', function() {
|
|||
});
|
||||
|
||||
|
||||
describe('password', function () {
|
||||
it('should not change password type to text', function () {
|
||||
compile('<input type="password" ng:model="name" >');
|
||||
expect(element.attr('type')).toBe('password');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it('should ignore text widget which have no name', function() {
|
||||
compile('<input type="text"/>');
|
||||
expect(scope.$element.attr('ng-exception')).toBeFalsy();
|
||||
|
|
|
|||
Loading…
Reference in a new issue