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

2575: Focus trap bottom action sheet #2576

Merged
merged 3 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
issue_key: 2575
show_in_stores: false
platforms:
- web
en: Fix feedback can not be opened from the bottom action sheet
4 changes: 2 additions & 2 deletions web/src/components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ const Modal = ({ title, closeModal, children, direction, wrapInPortal = false }:

return () => layoutElement?.setAttribute('aria-hidden', 'false')
}, [])

// display check option is needed for portals - https://github.com/focus-trap/tabbable/blob/master/CHANGELOG.md#532
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you linked the wrong release, shouldnt it be https://github.com/focus-trap/tabbable/blob/master/CHANGELOG.md#600?

It says

restore old (incorrect) behavior

Should we investigate a better fix?

Copy link
Contributor Author

@f1sh1918 f1sh1918 Nov 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna adjust the link.
I just investigated some time and i didn't find an easy solution. The trap works well with this option, so no idea if its really worth to investigate more time @steffenkleinle

const Modal = (
<FocusTrap focusTrapOptions={{ clickOutsideDeactivates: true }}>
<FocusTrap focusTrapOptions={{ clickOutsideDeactivates: true, tabbableOptions: { displayCheck: 'legacy-full' } }}>
<ModalContainer role='dialog' aria-hidden={false} aria-modal>
<Overlay onClick={closeModal} role='button' tabIndex={0} onKeyPress={closeModal} aria-label={t('close')} />
<ModalContentContainer>
Expand Down