Disable save password popup after user logged In (by Javascript)

8,343 views
Skip to first unread message

prayag ganoje

unread,
Aug 22, 2017, 2:42:52 AM8/22/17
to Chromium-discuss
How to disable save password popup once user logged in to website ?

I have tried autocomplete="newpassword" in password field but did not worked for me. 

What is the best way either by css / JS to achieve this ?

PhistucK

unread,
Aug 22, 2017, 2:49:59 AM8/22/17
to prayag...@gmail.com, Chromium-discuss
Not letting a user save their password is user hostile, which is why this is disabled in Chrome.

The question here is - do you want to disable it because you are looking for "added security" ("the user must type their password every time") or because it is not really a password/it is an old password field and this looks like a browser bug because it makes no sense to save that password?
For the former, you will have to use some JavaScript/HTML/CSS hacks in order to make the browser do this (it is not easy).
For the latter, you should file an issue at crbug.com in order to improve the heuristics of Chrome for saving passwords.

Anyway, autocomplete="newpassword" is actually instructing the browser to offer to save the password. If anything, autocomplete="oldpassword" (I forget whether this is the exact name, sorry, consult the specification) should instruct the browser not to show it. However, if the browser successfully (but sometimes falsely) detects that it is not really an old password field, it will still offer to save the password.


PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discuss+unsubscribe@chromium.org.

Jenn Cook

unread,
Aug 22, 2017, 4:18:02 AM8/22/17
to Chromium-discuss
why would you want to do that to someone elses email?  it's being done to mine as we speak...i am just so honored to be in it.

jenn cook

prayag ganoje

unread,
Aug 22, 2017, 4:46:28 PM8/22/17
to jennc...@gmail.com, Chromium-discuss
Following hack worked for IE & Chrome


<input type="password" class="stealthy" tabindex="-1">
<input type="password" name="user[password]" id="user_password" autocomplete="off">
<input type="password" class="stealthy" tabindex="-1">


.stealthy {
  left: 0;
  margin: 0;
  max-height: 1px;
  max-width: 1px;
  opacity: 0;
  outline: none;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  top: 0;
  z-index: -1;
}

Ref:



--
Reply all
Reply to author
Forward
0 new messages