Skip to content

Focus trap doesn't seem to be working in Modal in React Aria Components #4892

Answered by LFDanLu
MarekBodingerBA asked this question in Q&A
Discussion options

You must be logged in to vote

Ah I checked your yarn.lock, it could be due to multiple versions of @react-aria/overlay, resulting in multiple versions of the OverlayContext. This means the OverlayContext setup by the Modal's Overlay might be a different one that the Dialog within tries to access, hence the null value for ctx in useOverlayFocusContain. Could you confirm if this might be the case?

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@MarekBodingerBA
Comment options

@MarekBodingerBA
Comment options

@LFDanLu
Comment options

LFDanLu Aug 14, 2023
Collaborator

@LFDanLu
Comment options

LFDanLu Aug 14, 2023
Collaborator

Answer selected by MarekBodingerBA
@MarekBodingerBA
Comment options

@MarekBodingerBA
Comment options

@LFDanLu
Comment options

LFDanLu Aug 15, 2023
Collaborator

@MarekBodingerBA
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants