diff --git a/src/widget/input.js b/src/widget/input.js index ec9701e7244b..e920733be8ae 100644 --- a/src/widget/input.js +++ b/src/widget/input.js @@ -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"); /** diff --git a/test/widget/inputSpec.js b/test/widget/inputSpec.js index a4fc86aa918c..837d8c83190c 100644 --- a/test/widget/inputSpec.js +++ b/test/widget/inputSpec.js @@ -405,6 +405,14 @@ describe('widget: input', function() { }); + describe('password', function () { + it('should not change password type to text', function () { + compile(''); + expect(element.attr('type')).toBe('password'); + }); + }); + + it('should ignore text widget which have no name', function() { compile(''); expect(scope.$element.attr('ng-exception')).toBeFalsy();