[RAC] Stacked modals: closing overlay dismisses the one beneath it during its exit animation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- react, typescript
調査の方向性
packages/react-aria/src/overlays/useOverlay.ts から始め、特に visibleOverlays スタックと外部インタラクションの処理を確認してから、packages/react-aria-components/src/Modal.tsx のマウント動作と比較してください。リンクされた CodeSandbox でモーダルがスタックされたケースを再現してください。完了条件は、上にある終了中のモーダルがアンマウントされるまでインタラクションの所有者であり続け、そのため下のモーダルが閉じられないことです。
索引モデルが issue の本文から書いたものです。
説明
Provide a general summary of the issue here
With stacked modals (a Modal/ModalOverlay opened on top of another), closing the top modal while it has an exit animation can cause the modal underneath it to be dismissed by an outside-click that actually landed on the still-animating top modal.
🤔 Expected Behavior?
A modal that's still mounted and visually on top (mid exit-animation) should keep owning pointer interactions that land on it. Only a click genuinely outside all modals should dismiss the one beneath.
😯 Current Behavior
useOverlay only lets the topmost entry in its visibleOverlays stack react to outside interactions, but stack membership is keyed on isOpen — an overlay is spliced out the instant it starts closing:
react-aria-components, however, keeps the closing overlay mounted (backdrop + content, still on top, still hit-testable) until its exit animation finishes:
So during the exit animation the top overlay is gone from the stack but still physically covers the one beneath. A pointer interaction landing on it is, for the overlay beneath, "outside", and since that overlay is now visibleOverlays[last], the handler fires onHide() and closes it:
The "only the topmost visible overlay reacts to outside interactions" invariant is silently broken for any overlay mid exit-animation.
💁 Possible Solution
Keep an overlay in visibleOverlays until it actually unmounts, so it stays topmost as long as it's physically on top.
🔦 Context
We have a picker modal inside a dialog (pick an item, the picker closes, click something on the dialog, which lands on the exiting picker). Worked around it with a shouldCloseOnInteractOutside on the outer modal, ignoring interactions whose target is inside a modal.
🖥️ Steps to Reproduce
- Stack dismissable
ModalOverlayA, thenBon top, both withisExitingexit animations. - Close
B - While
Bis closing, click again Awill close because clicking on the exitingBis considered outsideA
Code sandbox: https://codesandbox.io/p/sandbox/dvnjy5
https://github.com/user-attachments/assets/58b286f1-6ab7-40cf-9491-c0efb822a848
Version
react-aria-components 1.19.0 (react-aria 3.50.0)
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
macOS
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- 主要言語
- TypeScript
- スター
- 16k
- フォーク
- 1.6k
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 41
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
adobe/react-spectrum のほかの issue
-
S2 quiet Picker menu is always 192px wide: its width calc() has no unit対応中かも @darshpatel1052 が 1 日前に担当しました。 オープンwaiting on author
難易度 2/5 1時間未満 初心者へのやさしさ 88/100
adobe/react-spectrum#10909 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
DatePicker omits timezone for initially empty fields despite zoned placeholderValue対応中かも @mrlexcoder が 1 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adobe/react-spectrum#10900 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Separator adds a redundant role="separator" to its default <hr>対応中かも @Janani-bn が 1 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
adobe/react-spectrum#10894 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is open対応中かも @mangeshraut712 が 7 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
adobe/react-spectrum#10866 ·
メンテナーはふだん 1 日以内に返信
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18対応中かも @mangeshraut712 が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
adobe/react-spectrum#10856 ·
メンテナーはふだん 1 日以内に返信
adobe/react-spectrum の issue をすべて見る
似ている issue
-
test: claim-conflict drop leaves both facts active and is never re-proposed (untested review cell)オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
[Feature]: Usage page should show API-equivalent cost and say when a connected plan shows info onlyオープンenhancement from-x
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
nightly-labs/openbot#4867 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
egonSchiele/agency-lang#1377 ·
メンテナーはふだん 1 日以内に返信
-
normalizePath removes the Windows device namespace prefix対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
caprover/caprover-frontend#273 ·
メンテナーはふだん 1 日以内に返信