[tbb-commits] [tor-browser] 02/14: 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
Thu Nov 17 14:03:41 UTC 2022


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

richard pushed a commit to branch tor-browser-91.13.0esr-11.5-1
in repository tor-browser.

commit f72260fb92891b9d5becfcef14e31be4f3636071
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 b90a3ab70d2a..360b33ff396e 100644
--- a/toolkit/components/printing/content/print.js
+++ b/toolkit/components/printing/content/print.js
@@ -349,9 +349,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