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

ma1 (@ma1) git at gitlab.torproject.org
Tue Jun 27 09:52:00 UTC 2023



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


Commits:
4a13c283 by hackademix at 2023-06-27T07:54:52+00:00
fixup! Bug 30237: Add v3 onion services client authentication prompt

- - - - -


1 changed file:

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


Changes:

=====================================
browser/components/onionservices/content/authPrompt.js
=====================================
@@ -73,8 +73,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(
+        `${OnionAuthUtil.domid.notification}-notification`
+      ))?.addEventListener("click", this._autoFocus);
+
       let descElem = xulDoc.getElementById(OnionAuthUtil.domid.description);
       if (descElem) {
         // Handle replacement of the onion name within the localized
@@ -159,6 +169,9 @@ const OnionAuthPrompt = (function() {
           this._boundOnKeyFieldInput = undefined;
         }
       }
+      if (this._popupElem) {
+        this._popupElem.removeEventListener("click", this._autoFocus);
+      }
     },
 
     _onKeyFieldKeyPress(aEvent) {



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

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/4a13c283b51fdf6f8748ebae9347152c59454c58
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/20230627/d2c086ba/attachment-0001.htm>


More information about the tbb-commits mailing list