Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite dialog(alert, etc.) loop on <Radio> button change with arrow key navigation #3771

Open
wonu opened this issue May 6, 2024 · 0 comments
Labels

Comments

@wonu
Copy link

wonu commented May 6, 2024

Current behavior

If radio buttons trigger a dialog (alert, confirm, or prompt) on change event, navigating between buttons with arrow keys causes an infinite loop of dialogs opening.

Steps to reproduce the bug

Tested on Windows 11, Chrome 124.0.6367.119, Firefox 125.0.3.

  1. Open https://stackblitz.com/edit/vitejs-vite-jbhfjq?file=src%2FApp.tsx,package.json&terminal=dev
    1. Created with vite.new/react-ts
    2. Installed @ariakit/react (0.4.6)
    3. Modified App.tsx
  2. Follow the reproduction setps in App.tsx
    1. click one radio button
    2. close alert dialog
    3. press an arrow key
    4. close alert dialog (loop starts here in Chrome)
    5. click the next button
    6. close alert dialog (loop starts here in Firefox)

Expected behavior

With native radio buttons, closing dialog does not trigger further dialogs.

Workaround

No response

Possible solutions

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants