cvn / angular-shims-placeholder

Angular directive to emulate the placeholder attribute on text and password input fields for old browsers, such as IE9, IE8, and IE7. Also works on textareas and html5 input types.
MIT License
63 stars 26 forks source link

Support for password inputs, without changing the type property #1

Closed rudasn closed 10 years ago

rudasn commented 10 years ago

Browsers throw an error when changing the type property of an input after it has been created. So when it comes to password inputs the directive doesn't work (not sure why the tests don't catch this).

This fix creates a clone of the original element, changes it's type, and then appends it to the DOM.

jrief commented 10 years ago

Thank you for this pull request, I will have a look at it soon.

juanpujol commented 10 years ago

Thank you for the concern with this problem. In IE8 I'm having this error on the password input.

Error: This command is not supported.<input class="form-control ng-pristine ng-valid" value="" type=password placeholder="Your password" ng-model="credentials.password" required>

Any thoughts on this?

Thank you again.

jrief commented 10 years ago

Thanks for this PR, and sorry having waited so long. Jacob