Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Die Funktionalität dieser Website ist durch Wartungsarbeiten eingeschränkt, die Ihr Erlebnis verbessern sollen. Wenn ein Artikel Ihr Problem nicht löst und Sie eine Frage stellen möchten, können Sie unsere Gemeinschaft über @FirefoxSupport auf Twitter, /r/firefox oder Reddit fragen.

Hilfe durchsuchen

Vorsicht vor Support-Betrug: Wir fordern Sie niemals auf, eine Telefonnummer anzurufen, eine SMS an eine Telefonnummer zu senden oder persönliche Daten preiszugeben. Bitte melden Sie verdächtige Aktivitäten über die Funktion „Missbrauch melden“.

Weitere Informationen

Preventing Focus Stealing When Restoring Session

  • 3 Antworten
  • 1 hat dieses Problem
  • 17 Aufrufe
  • Letzte Antwort von cor-el

more options

I am using Firefox 115.3 on Debian 12.1. I have numerous tasks which require the use of my web browser and have allocated a different virtual desktop for each. This means that my browser session typically has several dozen tabs open in numerous windows at one time. Under normal circumstances, this works just fine (and is a testament to the engineering that has gone into this browser).

My issue is that Firefox renders my machine virtually unusable for a few minutes each time I restart my desktop session due to focus stealing. When I open the browser, several dozen windows pop up (as expected) and relocate to their correct virtual desktops (as expected); however, as the windows begin to load, the most recently active Firefox window steals focus repeatedly. If I am, for instance, in the process of typing my password into my desktop e-mail client, a Firefox window may steal focus from the password dialog. In practice, this focus steal happens once every few seconds for several minutes.

I would prefer that Firefox would not steal focus while restoring a session. Does anyone have any suggestions for correcting this issue?

I am using Firefox 115.3 on Debian 12.1. I have numerous tasks which require the use of my web browser and have allocated a different virtual desktop for each. This means that my browser session typically has several dozen tabs open in numerous windows at one time. Under normal circumstances, this works just fine (and is a testament to the engineering that has gone into this browser). My issue is that Firefox renders my machine virtually unusable for a few minutes each time I restart my desktop session due to focus stealing. When I open the browser, several dozen windows pop up (as expected) and relocate to their correct virtual desktops (as expected); however, as the windows begin to load, the most recently active Firefox window steals focus repeatedly. If I am, for instance, in the process of typing my password into my desktop e-mail client, a Firefox window may steal focus from the password dialog. In practice, this focus steal happens once every few seconds for several minutes. I would prefer that Firefox would not steal focus while restoring a session. Does anyone have any suggestions for correcting this issue?

Alle Antworten (3)

more options

Changing /org/gnome/desktop/wm/preferences/focus-new-windows to strict on Ubuntu 23.10 makes windows open in the background for me.

more options

I appreciate the suggestion!

First: I'm using XFCE as my desktop environment. I know there's an XFCE equivalent to the setting that you describe. But second: I *do* want focus to be taken under normal circumstances. It's just during Firefox's startup that I don't want continuous focus stealing.

It turns out that the windows that are stealing focus aren't *new*, either. When I first open Firefox, a few dozen windows pop up immediately (to recover my previous session). The fact that these windows steal focus in the second or two after I start Firefox makes sense to me given my desktop settings. But, for some reason, those windows keep *refocusing* as they start their page load cycles. It is this refocusing behavior that makes my environment unusable and that I would like to prevent.

Thanks again for the response, though. If one is entirely opposed to focus stealing in Gnome, it seems likely that the setting adjustment you describe would do the job.

more options

You can set all tabs to open on demand to avoid that Firefox changes focus to them as they are loading, this also speeds up the startup time.

  • browser.sessionstore.restore_on_demand = true
  • browser.sessionstore.restore_pinned_tabs_on_demand = true