clients icon indicating copy to clipboard operation
clients copied to clipboard

AliExpress tab repeatedly brings Chromium to foreground when Bitwarden is enabled

Open lapinpt opened this issue 2 weeks ago • 42 comments

Steps To Reproduce

  1. Enable the Bitwarden browser extension.
  2. Allow Bitwarden to run in Incognito mode.
  3. Open https://pt.aliexpress.com/item/1005001878983336.html in Chromium.
  4. Minimize the browser window or switch to another application.

Expected Result

The Chromium window remains minimized or in the background until the user explicitly activates it.

Actual Result

The Chromium window repeatedly returns to the foreground, interrupting work in other applications.

Screenshots or Videos

No response

Additional Context

Troubleshooting results:

  • Closing the AliExpress tab immediately stops the behavior.
  • The same behavior occurs in an Incognito window.
  • Bitwarden was allowed to run in Incognito mode.
  • Disabling only the Bitwarden extension stops the behavior.
  • Re-enabling Bitwarden allows the behavior to return.
  • The issue was reproduced with Bitwarden 2026.10.2 and Chromium Portable 149.0.7827.201.
  • The exact mechanism causing the focus change has not been identified.

Similar reports from other users: https://www.reddit.com/r/Bitwarden/comments/1xyjttl/having_bitwarden_enabled_on_edge_win11_keeps/

Operating System

Windows

Operating System Version

21H2

Web Browser

Chrome

Browser Version

149.0.7827.201

Environment Versions

Version: 2026.10.2

SDK: COMMERCIAL-'main (4a9eb23)'

Server version (Third-party): 2026.6.0

Connected to third-party server implementation, Vaultwarden. Please verify bugs using the official server, or report them to the third-party server.

Issue Tracking Info

  • [x] I understand that work is tracked outside of GitHub. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

lapinpt avatar Nov 17 '26 15:11 lapinpt

Thank you for reporting this issue! We've added this to our internal tracking system. ID: PM-47128 Link (for internal use): https://bitwarden.atlassian.net/browse/PM-47128

bitwarden-bot avatar Nov 17 '26 15:11 bitwarden-bot

I have the same issue (Bitwarden 2026.10.2, Chrome, Windows). In my case the AliExpress tab/pane keeps stealing focus inside the browser.

I found what triggers it:

  1. Turning off "Show autofill suggestions on form fields" fixes it. Bitwarden can stay enabled.
  2. Blocking only this Criteo ads script also fixes it, even with suggestions on: https://static.criteo.net/js/ld/ld.js Unblocking it brings the bug back.

That script adds a hidden ad iframe (gum.criteo.com/syncframe) that keeps creating and removing frames inside it. The service worker console shows many errors like: "triggerAutofillScriptInjection ... Frame with ID ... was removed"

The extension does not call chrome.tabs.update, so the jump seems to come from focus inside those frames. There are no login fields on the page.

So this probably affects any site with Criteo ads, not only AliExpress.

thalaz avatar Nov 17 '26 15:11 thalaz

I can confirm this issue on Linux + Brave (1.99.55 - Chromium 157.0.8103.39) + Bitwarden extension (2026.10.2). The browser keeps forcing focus back to the AliExpress tab, even when I switch to another tab or application. Disabling autofill specifically for AliExpress in the extension settings didn't fix the issue. However, disabling autofill entirely or removing the AliExpress URL from the vault entry did resolve it.

LufoX11 avatar Nov 17 '26 17:11 LufoX11

I confirm, Chrome on windows 11 with BitWarden : Blocking https://static.criteo.net/js/ld/ld.js (as per @thalaz )with ublock origin after enabling "allow user scripts" in its options fixes the issue for me.

stanelie avatar Nov 17 '26 17:11 stanelie

Is there an update on when this will be fixed? The Bitwarden extension sometimes slows down my browser, and recurring issues like this are making it frustrating to use. I’ve been a paying customer for over three years, but I’m now considering cancelling my subscription.

moazam1 avatar Nov 17 '26 18:11 moazam1

I also am having this issue and was able to reproduce the issue in the following circumstances:

  • Browser(s): Chrome (157.0.8103.79) or Edge (157.0.4341.60)
  • Operating System(s): Windows 11 25H2
  • Bitwarden extension version 2026.10.2 installed, active, signed in, and with a vault item present that has aliexpress.us as one of the vault item's URIs.
  • One or more tabs open at the AliExpress website (https://www.aliexpress.us/)

If the Bitwarden extension is disabled, does not contain a vault item with the URI aliexpress.us, or there is no browser tab open to the AliExpress website, the issue does not occur.

I was not able to reproduce the behavior on Ubuntu 26.04 with Firefox (160.0) or Chrome (157.0.8103.78) myself; however, other people in the Reddit thread and this issue's comments mentioned did report this issue on Linux with both Chrome and Brave.

finackninja avatar Nov 17 '26 20:11 finackninja

Root cause found. I think this is fixed by #24806 (currently open), which addresses #23663. Posting details to help connect the two.

Environment: Bitwarden 2026.10.2 (Edge Add-ons), Microsoft Edge 157.0.4341.60, Windows 11 25H2. Reproduces in InPrivate (Bitwarden allowed there). Disabling only Bitwarden stops it immediately.

Trigger (page side): after opening an AliExpress item page and then refreshing it, a script on the page calls

navigator.credentials.get({ publicKey: { challenge: <bytes>, rpId: ":invalid:" } })

about once per second, including while the tab is hidden. I logged 69 calls in ~70 s, and 44 of them were made from a hidden tab. Without Bitwarden this is harmless. The native API rejects each call immediately with SecurityError and shows no UI. I tested a plain page making the same call every second from a background tab in Edge: no focus change, and the minimized window stays minimized.

Focus change (Bitwarden side): fido2-page-script.js intercepts the call and forwards it to the background. Fido2Client.assertCredential rejects it (isValidRpId → SecurityError). But Fido2Background.handleCredentialRequest then runs its finally block unconditionally:

} finally {
  if (tab.id != null) {
    await BrowserApi.focusTab(tab.id);        // chrome.tabs.update(id, { active: true, highlighted: true })
  }
  if (tab.windowId != null) {
    await BrowserApi.focusWindow(tab.windowId); // chrome.windows.update(id, { focused: true })
  }
}

(apps/browser/src/autofill/fido2/background/fido2.background.ts, still present on main.) So every rejected background request re-activates the AliExpress tab and restores/focuses its window, roughly once per second.

Workaround until a fix ships: add aliexpress.com to Settings → Notifications → Excluded domains. isFido2FeatureEnabled() then returns false (also confirmed in #24806).

#24806 only refocuses when the requesting tab was active and the request wasn't aborted, which should fix this case too. Could it also be linked to this issue?

MrCyberDuck avatar Nov 17 '26 20:11 MrCyberDuck

Same here. Win11 - Edge + Bitwarden extension

Shad0w80 avatar Nov 17 '26 21:11 Shad0w80

I've also got this issue on Brave and Bitwarden

gyrex avatar Nov 17 '26 23:11 gyrex

Hi there,

This report has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

cbw23 avatar Nov 18 '26 00:11 cbw23

Can also confirm behavior on Brave+Bitwarden (1.99.57+2026.10.2). I also tried it on Firefox (160.0+2026.10.2), but it did NOT occur.

lamberaw avatar Nov 18 '26 03:11 lamberaw

same behaviour in W11-chrome. disabling bitwarden fixes the issue

uqcrami avatar Nov 18 '26 04:11 uqcrami

Same issue on Linux with Chrome 157.0.8103.78

s-mod avatar Nov 18 '26 06:11 s-mod

Happening on Chromium Version 156.0.8078.79 (Official Build) built on Debian GNU/Linux 13 (trixie) (x86_64) Bitwarden version: 2026.10.2

arifur avatar Nov 18 '26 06:11 arifur

See also: https://github.com/bitwarden/clients/issues/23663#issuecomment-6971803891

Wlanfr3ak avatar Nov 18 '26 07:11 Wlanfr3ak

Same here on Linux with Brave 1.99.57 (KDE Plasma 6.7.5) and Bitwarden 2026.10.2. The AliExpress tab is re-activated and its window focused every time I switch to another tab or virtual desktop.

What I tested:

  • A private window, where Bitwarden is not allowed to run, does not show it.
  • Turning off "Ask to save and use passkeys" (Settings → Notifications) stops it, but that disables Bitwarden's passkeys on every site.
  • Adding aliexpress.com to Settings → Autofill → Blocked domains does not stop it.

A workaround that keeps Bitwarden's passkeys working on all other sites is to stop the page from making the WebAuthn call at all. In Brave, add these two lines under brave://settings/shields/filters (custom filters) and reload the tab:

aliexpress.com##+js(set-constant, PublicKeyCredential, undefined) aliexpress.com##+js(set-constant, navigator.credentials.get, noopFunc)

With both lines in place the focus changes stopped. I did not test which of the two is the one that matters, and I have not tried them in uBlock Origin, which uses the same syntax. The cost is that passkey sign-in on AliExpress itself no longer works while the lines are there. They cover aliexpress.com and its subdomains, so other AliExpress domains need their own pair.

This fits the cause described in #24806: the extension focuses the tab and window after every passkey request it handles, so preventing the request avoids it.

jesmak avatar Nov 18 '26 08:11 jesmak

Test page for reproducing the issue.

https://github.com/lukecardelli/bitwarden-focus-steal

https://lukecardelli.github.io/bitwarden-focus-steal/

lukecardelli avatar Nov 18 '26 08:11 lukecardelli

@lukecardelli Can confirm that test page replicates the issue exactly for me

Clonkex avatar Nov 18 '26 09:11 Clonkex

Having same issue on Google Chrome Version 157.0.8103.52 (Official Build) (arm64), MacOS 26.6.2 (25G83).

On my case only disabling Bitwarden Chrome Extension solved it.

wbknght avatar Nov 18 '26 10:11 wbknght

Same issue on: Brave 1.99.57 (Official Build) (64-bit) Chromium: 157.0.8103.79 Version: 2026.10.2

Turning off "Show autofill suggestions on form fields" - has not fixed it for me. Adding aliexpress.com to the autofill blocklist has also not fixed it.

Confirmed @jesmak : Turning off "Ask to save and use passkeys" (Settings → Notifications) stops it, but that disables Bitwarden's passkeys on every site.

coalfield avatar Nov 18 '26 11:11 coalfield