Google Chrome Releases

Fix Firefox virtual desktop behavior in 145: two about:config prefs

Fix Firefox virtual desktop behavior in 145: two about:config prefs I’ve watched Firefox yank a new window onto the wrong desktop mid-call. It’s annoying, and in Firefox 145 it’s finally tweakable. What changed (and why you care) Virtual desktops work until they don’t. You sit on Desktop 2, click a link in Slack, and Firefox […]

Jack Pauley November 28, 2025 6 min read

Fix Firefox virtual desktop behavior in 145: two about:config prefs

I’ve watched Firefox yank a new window onto the wrong desktop mid-call. It’s annoying, and in Firefox 145 it’s finally tweakable.

What changed (and why you care)

Virtual desktops work until they don’t. You sit on Desktop 2, click a link in Slack, and Firefox decides Desktop 1 deserves your attention more than you do.

Firefox 145 added a switch for that Windows behavior. It’s called widget.prefer_windows_on_current_virtual_desktop, and it lets you choose whether Firefox should prefer windows on the desktop you’re actively using when another app opens a link.

There’s a second switch that controls session restore placement. It’s browser.sessionstore.restore_windows_to_virtual_desktop, and it decides whether Firefox tries to put restored windows back on their prior virtual desktops.

Before you touch about:config

Back up first. Seriously.

I’ve seen people flip one “harmless” pref, forget what they changed, then spend an hour chasing ghosts. If you run a work machine with managed policies or a tiling window manager, your results will depend on your setup, so you want an easy rollback.

  • Use a throwaway profile: Create a new Firefox profile for testing, change the prefs there first, then copy the behavior into your main profile if it works.
  • Know your platform limits: The “current virtual desktop” preference targets Windows virtual desktops. On macOS Spaces and Linux workspaces, your window manager can still make its own calls.

Step-by-step: set the two prefs

🔔 Never Miss a Breaking Change

Get weekly release intelligence — breaking changes, security patches, and upgrade guides before they break your build.

✅ You're in! Check your inbox for confirmation.

So. Open a new tab and type about:config.

Firefox shows a warning because these settings can break things. Accept it, then use the search box at the top.

1) Control where external-link windows open

Search for widget.prefer_windows_on_current_virtual_desktop.

  • Set it to true: Firefox prefers windows on your current virtual desktop when another app opens a link. This usually stops the “teleport to Desktop 1” problem.
  • Set it to false: Firefox can reuse a window on a different desktop, which some people prefer because it keeps everything in one “main” Firefox window.

2) Control where session restore puts your windows

Search for browser.sessionstore.restore_windows_to_virtual_desktop.

  • Set it to true: Firefox attempts to restore windows back to the virtual desktops they lived on when you closed the browser. Great if you keep “Project A” and “Project B” separated.
  • Set it to false: Firefox restores onto your current desktop so you can reorganize from scratch. I do this on my personal laptop because I hate hunting for a window across four desktops.

If you flip these and nothing changes, do not assume Firefox ignored you. Test with a clean profile, then check whether your OS or window manager overrides window placement.

Quick verification tests (takes 2 minutes)

Test it. Do not guess.

Run these in order. They tell you whether you fixed the actual problem or just changed a pref that never applied in your environment.

  • Test A (external link): Put Firefox on Desktop 1. Switch to Desktop 2. From another app (Slack, Outlook, Teams), click a link. Expectation: with widget.prefer_windows_on_current_virtual_desktop=true, the Firefox window you get should appear on Desktop 2.
  • Test B (session restore): Put one Firefox window on Desktop 1 and another on Desktop 2. Close Firefox fully. Reopen it. Expectation: with browser.sessionstore.restore_windows_to_virtual_desktop=true, windows should try to return to their prior desktops.

Troubleshooting when Firefox still opens on the “wrong” desktop

This bit me when I had a window manager “helper” running. It fought Firefox and won.

  • You cannot find the prefs: Confirm you’re actually on Firefox 145.0a1 or newer. Nightly builds move fast, and stable builds lag. If you’re on an older version, those keys will not exist.
  • The behavior never changes: Disable any desktop/window placement utilities temporarily. On Linux, check your desktop environment’s window rules. On Windows, check tools that manage focus or window switching.
  • Session restore scatters windows unpredictably: Set browser.sessionstore.restore_windows_to_virtual_desktop=false and see if the chaos stops. If it does, your OS likely reports virtual desktop IDs differently across logins or monitor changes.

Next steps (if you want deeper separation)

Profiles beat prefs. Most days.

If you want hard separation between work and personal browsing, use Firefox Profiles. If you only need cookie separation inside one window, use Multi-Account Containers. Other stuff in this release: dependency bumps, some image updates, the usual.

Anyway.