Remove custom reveal/conceal button on password field
Categories
(Firefox :: about:logins, enhancement, P3)
Tracking
()
People
(Reporter: serg, Assigned: mtigley)
References
(Blocks 2 open bugs)
Details
(Keywords: leave-open, Whiteboard: [fxcm-productive-ux])
Attachments
(6 files)
Bug 1743046 will enable built-in reveal/conceal for password inputs.
We should remove custom implementation from about:logins.
Reporter | ||
Comment 1•3 years ago
|
||
Reporter | ||
Updated•3 years ago
|
Comment 2•3 years ago
|
||
Hello Sergey Galich, I want to work upon this bug. I request you to kindly assign this bug to me.
Reporter | ||
Comment 3•3 years ago
|
||
Hello Ritika, this bug is harder than it looks. We still haven't decided what exactly we want to do with it - remove custom implementation in about:logins or disable new password reveal icon. We will either need reveal/conceal events from the <input type=password> (there are no such events today) or we will need to opt-out from new reveal button in input fields (which is also not possible today).
Reporter | ||
Updated•3 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Comment 5•2 years ago
|
||
The idea is that chrome code would be able to call preventDefault(),
then run whatever authentication they need to do, then setRevealPassword
again.
Assignee | ||
Comment 6•2 years ago
|
||
Hmm, I'm still unable to detect the "MozWillRevealPassword" event after its registered on the input element. Emilio, do you know why that might be the case?
Comment 7•2 years ago
|
||
I think you need to listen to it from the privileged actor. Something like this seems to work:
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
index 5333e10313866..ef10e10fde1b6 100644
--- a/browser/components/BrowserGlue.sys.mjs
+++ b/browser/components/BrowserGlue.sys.mjs
@@ -238,6 +238,7 @@ let JSWINDOWACTORS = {
AboutLoginsSyncOptions: { wantUntrusted: true },
AboutLoginsUpdateLogin: { wantUntrusted: true },
AboutLoginsExportPasswords: { wantUntrusted: true },
+ MozWillRevealPassword: {},
},
},
matches: ["about:logins", "about:logins?*", "about:loginsimportreport"],
diff --git a/browser/components/aboutlogins/AboutLoginsChild.sys.mjs b/browser/components/aboutlogins/AboutLoginsChild.sys.mjs
index c02975b9afe08..b7f8e95798ca8 100644
--- a/browser/components/aboutlogins/AboutLoginsChild.sys.mjs
+++ b/browser/components/aboutlogins/AboutLoginsChild.sys.mjs
@@ -107,9 +107,17 @@ export class AboutLoginsChild extends JSWindowActorChild {
this.#aboutLoginsUpdateLogin(event.detail);
break;
}
+ case "MozWillRevealPassword": {
+ this.#willRevealPassword(event);
+ break;
+ }
}
}
+ #willRevealPassword(event) {
+ dump(`MozWillRevealPassword(${event.target.outerHTML})\n`);
+ }
+
#aboutLoginsInit() {
this.sendAsyncMessage("AboutLogins:Subscribe");
Assignee | ||
Comment 8•2 years ago
|
||
(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)
Ah makes sense! Thanks.
Assignee | ||
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Feels rather odd...
Updated•2 years ago
|
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Comment 11•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 12•2 years ago
|
||
Description
•