Escape doesn't dismiss a ModalOverlay in WebKit while its CSS keyframe enter animation is running (react-aria 3.53 / RAC 1.22)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- react, typescript
- Ambito
- frontend
Direzione di ricerca
Start by reproducing the Escape-during-enter-animation case in Playwright WebKit using a ModalOverlay with a CSS keyframe animation while isEntering is true. Then trace how useEnterAnimation, useModalOverlay and useDialog gate keyboard dismissal on isEntering, using the 3.51.0 to 3.53.0 change (PR #10102) as the reference point. Done means Escape closes the modal during the enter animation in WebKit and the Chromium and Firefox behaviour is unchanged.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Provide a general summary of the issue here
In WebKit, pressing Escape while a ModalOverlay is still playing a CSS keyframe enter animation does nothing, and the modal stays open. It works in Chromium and Firefox, and it worked in react-aria 3.51.0 / RAC 1.20.0. Using a CSS transition for the same fade instead of a keyframe animation avoids the problem.
🤔 Expected Behavior?
Escape dismisses the modal whenever it's open, including during its enter animation, as it did in 3.51.0 and still does in Chromium/Firefox.
😯 Current Behavior
The keypress is ignored until the enter animation has finished. Pressing Escape again afterwards closes the modal.
A minimal setup that reproduces it (Tailwind + tailwindcss-animate):
Open
<ModalOverlay
isDismissable
className={({ isEntering }) => isEntering ? 'animate-in fade-in duration-200' : ''}
<Modal>
<Dialog><input autoFocus /></Dialog>
</Modal>
Playwright (WebKit): focus the trigger, press Enter, then press Escape right away. The dialog is still visible after 5 s.
StackBlitz Reproduction
It's hard to reproduce this in Stackblitz
🖥️ Steps to Reproduce
- Render the snippet above, with a CSS keyframe enter animation (e.g.
animate-in fade-in duration-200) onModalOverlaywhileisEntering. - Open the page in Safari / Playwright WebKit.
- Focus the "Open" button and press Enter.
- Immediately press Escape, before the 200 ms fade-in has finished.
- The modal stays open. Pressing Escape again after the animation has finished closes it.
💁 Possible Solution
Keyboard dismissal (and the other useOverlay behaviour) should stay active while isEntering is true. Alternatively, the enter-animation tracking shouldn't block it when the running animation is a CSS keyframe animation on the overlay.
🔦 Context
Our Playwright WebKit integration tests started failing consistently after upgrading react-aria 3.51.0 → 3.53.1 and react-aria-components 1.20.0 → 1.22.1. It also affects real Safari users: Escape right after opening a modal (e.g. a ⌘K command menu) is ignored.
We worked around it by switching the overlay's fade from a CSS keyframe animation to a CSS transition, but keyframe enter animations on ModalOverlay are a common pattern (including in the RAC Tailwind examples), so others are likely to hit this.
PR #10102 (3.53.0) reworked useEnterAnimation and added isEntering handling to useModalOverlay/useDialog. That looks like the likely source; #10782 was another regression from the same change.
Version
[email protected]
[email protected]
[email protected]
What browsers are you seeing the problem on?
Safari
If other, please specify.
WebKit, Playwright WebKit 27.2
What operating system are you using?
macOS, and Linux
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- Lingua principale
- TypeScript
- Stelle
- 16k
- Fork
- 1.6k
- Merge medio
- 4g 10h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adobe/react-spectrum
-
Declare @types/react as an optional peer dependencyForse già presa @Sophran-fbj l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
adobe/react-spectrum#10940 ·
I maintainer di solito rispondono entro 1 giorno
-
@internationalized/number: NumberParser misparses Arabic-digit numbers that use . , or ، (sd parses ١٬٢٣٤.٥ as 12345)Forse già presa @itsrayeedscodespace l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
adobe/react-spectrum#10936 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
PreviewTrigger: the preview dialog has no accessible nameForse già presa @therealemmanueloppong l’ha presa 6 giorni fa. Apertaaccessibility bug PreviewTrigger
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
adobe/react-spectrum#10917 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unitForse di nuovo libera @darshpatel1052 l’ha presa 8 giorni fa e non c’è nessuna pull request aperta. Apertawaiting on author
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 88/100
adobe/react-spectrum#10909 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValueForse già presa @mrlexcoder l’ha presa 9 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
adobe/react-spectrum#10900 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di adobe/react-spectrum
Issue simili
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
assistant-ui/assistant-ui#10499 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
bug server-sequentialthinking v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
modelcontextprotocol/servers#5526 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
app-server bug CLI
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
cimd: default originBoundFields rejects a cross-origin client_uri, which the CIMD draft forbidsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
better-auth/better-auth#12458 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno