Skip to content

Opening a dialog from a dropdown menu steals focus #1307

@rogerfar

Description

@rogerfar

Describe the bug

When opening a dialog from a drop down menu item, and the dialog has an input, it will focus the input, but then immediately move the focus back to the drop down menu button.

Reproduction

https://stackblitz.com/edit/vitejs-vite-fkeqqbyq?file=src%2FApp.svelte

Logs

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700
    Memory: 32.53 GB / 63.79 GB
  Binaries:
    Node: 22.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 11.2.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (132.0.2957.127)
    Internet Explorer: 11.0.19041.4355

Severity

blocking an upgrade

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageA maintainer needs to review this issue and label it appropriately

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions