[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-115.11.0esr-13.0-1] fixup! Bug 30237: Add v3 onion services client authentication prompt

ma1 (@ma1) git at gitlab.torproject.org
Thu May 9 16:03:58 UTC 2024



ma1 pushed to branch tor-browser-115.11.0esr-13.0-1 at The Tor Project / Applications / Tor Browser


Commits:
e4ed3f35 by hackademix at 2024-05-09T17:49:50+02:00
fixup! Bug 30237: Add v3 onion services client authentication prompt

Bug 42557: Fix regression in Onion Services authentication prompt focus

- - - - -


1 changed file:

- browser/components/onionservices/content/authPrompt.js


Changes:

=====================================
browser/components/onionservices/content/authPrompt.js
=====================================
@@ -81,8 +81,18 @@ const OnionAuthPrompt = (function () {
       );
     },
 
+    _autoFocus(event) {
+      event.target.ownerGlobal.focus();
+    },
+
     _onPromptShowing(aWarningMessage) {
       let xulDoc = this._browser.ownerDocument;
+
+      // Force back focus: tor-browser#41856
+      (this._popupElem = xulDoc.getElementById(
+        "tor-clientauth-notification"
+      ))?.addEventListener("click", this._autoFocus);
+
       let descElem = xulDoc.getElementById("tor-clientauth-notification-desc");
       if (descElem) {
         // Handle replacement of the onion name within the localized
@@ -153,6 +163,7 @@ const OnionAuthPrompt = (function () {
           this._boundOnKeyFieldInput = undefined;
         }
       }
+      this._popupElem?.removeEventListener("click", this._autoFocus);
     },
 
     _onKeyFieldKeyPress(aEvent) {



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e4ed3f35d87f8351bc5a6aa3fd2263ec06ad5413

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/e4ed3f35d87f8351bc5a6aa3fd2263ec06ad5413
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20240509/2b5e695a/attachment-0001.htm>


More information about the tbb-commits mailing list