angular-shims-placeholder icon indicating copy to clipboard operation
angular-shims-placeholder copied to clipboard

Focus doesn't work with password fields in IE9

Open deopard opened this issue 9 years ago • 1 comments

Since the plugin generates a text input for masking when polyfilling password input placeholder, focusing the original empty password input field won't be shown to the user.

deopard avatar Jan 21 '16 02:01 deopard

Thanks for reporting this issue. I can't think of an elegant solution right now, but here's a workaround if it's useful for you. This relies on the internal implementation of angular-shims-placeholder, so it's kinda fragile, but it would work.

if (elem.hasClass('ng-hide')) {
    // handle focusing empty angular-shims-placeholder password inputs
    $(elem).prev('.empty').focus();
} else {
    $(elem).focus();
}

cvn avatar Feb 19 '16 20:02 cvn