Closed Bug 1750072 Opened 4 years ago Closed 1 year ago

Enable password reveal on chrome documents except about:logins

Categories

(Core :: Layout: Form Controls, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
127 Branch

People

(Reporter: serg, Assigned: emilio, NeedInfo)

References

(Blocks 4 open bugs)

Details

(Whiteboard: [fxcm-productive-ux])

Attachments

(7 files, 1 obsolete file)

Bug 1743046 will enable built-in reveal/conceal for password inputs.
We should remove custom implementation from about:logins.

Attached image double-reveal.png
Blocks: 1743046
Blocks: 1742338
Severity: -- → N/A
Priority: -- → P1

Hello Sergey Galich, I want to work upon this bug. I request you to kindly assign this bug to me.

Flags: needinfo?(sgalich)

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).

Flags: needinfo?(sgalich)
Priority: P1 → P2
Priority: P2 → P3
Blocks: 1706886
Assignee: nobody → mtigley
Status: NEW → ASSIGNED

The idea is that chrome code would be able to call preventDefault(),
then run whatever authentication they need to do, then setRevealPassword
again.

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?

Flags: needinfo?(emilio)

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");
 
Flags: needinfo?(emilio)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #7)

Ah makes sense! Thanks.

Attachment #9324791 - Attachment description: Bug 1750072 - Untested: Allow to prevent password revealing. r=mtigley → Bug 1750072 - Allow to prevent password revealing/unrevealing. r=mtigley
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/49d0f7fb2091 Allow to prevent password revealing/unrevealing. r=mtigley
Keywords: leave-open
Keywords: leave-open
Whiteboard: [fxcm-productive-ux]

The leave-open keyword is there and there is no activity for 6 months.
:mtigley, maybe it's time to close this bug?
For more information, please visit BugBot documentation.

Flags: needinfo?(mtigley)
See Also: → 1893284

Much like we do for the number input spinners.

Attachment #9324766 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/74da0b0c92b4 Allow to opt-out of password reveal using appearance: textfield. r=jwatt
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b5fc9bfb805 Enable password reveal on chrome documents, and opt out on about:logins for now. r=desktop-theme-reviewers,dao
Regressions: 1895561
Regressions: 1895613
Regressions: 1913889
Regressions: 1936548
No longer blocks: 1748065
Depends on: 1748065

Since patches landed in this bug and there are regressions against it, I think it's easier for tracking if we close this and the remaining work to remove the custom reveal password button for about:logins can be done in bug 1706886.

Assignee: mtigley → emilio
No longer blocks: 1742338
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Component: about:logins → Layout: Form Controls
Keywords: leave-open
Product: Firefox → Core
Resolution: --- → FIXED
See Also: → 1742338
Summary: Remove custom reveal/conceal button on password field → Enable password reveal on chrome documents except about:logins
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: