Skip to content

[bug] Alt+Tab -ing to window won't focus its contents on Windows with unstable feature (can't interact with content using keyboard) #13466

@WofWca

Description

@WofWca

Describe the bug

When you Alt + Tab to a Tauri window, or otherwise focus it without clicking on its contents, you are unable to interact with its contents without first clicking inside of it.

Reproduction

  1. Add unstable feature to examples/api app:

    features = [
    "protocol-asset",
    "image-ico",
    "image-png",
    "isolation",
    "macos-private-api",
    "tray-icon",
    ]

  2. Build and start the example app.

  3. Press Alt + Tab to un-focus it.

  4. Press Alt + Tab to focus it again

  5. Press Tab

Expected behavior

Pressing Tab moves focus to the next HTML element.

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.19045 x86_64 (X64)
    ✔ WebView2: 136.0.3240.76
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.85.1 (4eb161250 2025-03-15)
    ✔ cargo: 1.85.1 (d73d2caf9 2024-12-31)
    ✔ rustup: 1.28.1 (f9edccde0 2025-03-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 20.19.0
    - pnpm: 10.10.0
    - npm: 10.8.2

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-log 🦀: 2.4.0
    - @tauri-apps/plugin-log : not installed!

[-] App
    - build-type: bundle
    - CSP: font-src https://fonts.gstatic.com; style-src 'unsafe-inline' 'self' https://fonts.googleapis.com; connect-src ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost blob: data:; default-src 'self' customprotocol: asset:
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace


Additional context

The bug does not appear without unstable. The same goes for our own app.

This looks highly related to #9755 (fixed by #13222).

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope: unstable flagIssue only occures with "unstable" feature flag enabledstatus: needs triageThis issue needs to triage, applied to new issuestype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions