[tbb-commits] [tor-browser] 12/46: Bug 1790815 - Don't raise the window for tab-modal SubDialogs and in print. r=Gijs, a=dmeehan

gitolite role git at cupani.torproject.org
Wed Nov 16 20:42:52 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch base-browser-102.5.0esr-12.0-1
in repository tor-browser.

commit ee3c8cbd4d2eade30ba747fc390b98d17318d514
Author: Emilio Cobos Álvarez <emilio at crisal.io>
AuthorDate: Mon Oct 17 20:37:23 2022 +0000

    Bug 1790815 - Don't raise the window for tab-modal SubDialogs and in print. r=Gijs, a=dmeehan
    
    Differential Revision: https://phabricator.services.mozilla.com/D157599
---
 toolkit/components/printing/content/print.js | 4 +---
 toolkit/modules/SubDialog.jsm                | 2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/toolkit/components/printing/content/print.js b/toolkit/components/printing/content/print.js
index 8ad0634843c7..95edf1bea7d1 100644
--- a/toolkit/components/printing/content/print.js
+++ b/toolkit/components/printing/content/print.js
@@ -355,9 +355,7 @@ var PrintEventHandler = {
     await new Promise(resolve => window.requestAnimationFrame(resolve));
 
     // Now that we're showing the form, select the destination select.
-    window.focus();
-    let fm = Services.focus;
-    fm.setFocus(document.getElementById("printer-picker"), fm.FLAG_SHOWRING);
+    document.getElementById("printer-picker").focus({ focusVisible: true });
 
     await initialPreviewDone;
   },
diff --git a/toolkit/modules/SubDialog.jsm b/toolkit/modules/SubDialog.jsm
index c3fd2bdbef90..3940846de484 100644
--- a/toolkit/modules/SubDialog.jsm
+++ b/toolkit/modules/SubDialog.jsm
@@ -839,7 +839,7 @@ SubDialog.prototype = {
     if (!focusedElement) {
       // Ensure the focus is pulled out of the content document even if there's
       // nothing focusable in the dialog.
-      this._frame.contentWindow.focus();
+      this._frame.focus();
     }
   },
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list