Close(x) icon for password field or obfuscated text input field

Close(x) icon is not displaying for password field or text input field with obfuscated yes. I used userwork form to display close icon for text input control with below code, but same is not working for password field and obfuscated text input field.

input[type=text]::-ms-clear { color: black; display: block !important; }

pega version - 7.1.8

Any help on this?

***Edited by Moderator: Pallavi to update platform capability tags***


Keep up to date on this post and subscribe to comments

January 22, 2019 - 11:32am

There's a handful of issues with this approach. Not sure if you've considered these points, but... the "-ms-clear" pseudo-element is not a standard directive. It is IE only.


Also, you've only targeted text type input fields, so your implementation would never take effect on a password (or other input fields for that matter) field.

However, I do not believe targeting password fields as well (e.g. input[type=password]::-ms-clear ...) will work, as browsers will handle password fields specially in their own way. I believe most will typically override this behavior anyways.