We have an application with a login screen which has input field text and password. What I am trying to achive here is;
The things I tried;
autocomplete="off"
on both form and inputs but with
the new Firefox version, it doesn't seem to work.autocomplete="new-password"
but internet explorer
completely ignores it.. (like I am surprised)So if anyone achieved a good result with any other solutions, and if it could be shared, it would be a great contribution to developer community.
You cannot do this while using an input field for passwords. I also strongly advise against you using a regular input field, because many browsers save inputs to those too (but in plain text).
Using a text box inside a canvas is not good for accessibility, and it also is completely incompatible with older browsers.
Your best bet is going to be creating a hidden div
that you can type in via contenteditable
, and then creating a fake password entry overlay that adds a •
every time you type a character. This has the exact same level of treatment from the browser as a regular password input, but the browser won't prompt you to save it.
This cannot be prevented from scripts, the only way to prevent is you can disable Autofill in Browser Settings.
You should put text input box inside a canvas.
Take a look at CanvasInput and canvas-text-editor.
By using canvas to draw input box you can trick browsers.
or you can use contenteditable
on a div.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With