-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Do not trap focus on troubleshoot and save the world pages #43832
Do not trap focus on troubleshoot and save the world pages #43832
Conversation
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎸
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: Nativeios.moviOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
@jnowakow "5. Verify that ..." is missing in QA Steps |
Is this bug out of scope? As you see my video, composer is not highlighted when click on composer to close modal. Though I am able to type. Screen.Recording.2024-06-17.at.11.12.59.AM.mov |
@aimane-chnaif I fixed this issue as well focus.mov |
@@ -9,7 +9,7 @@ function FocusTrapForModal({children, active}: FocusTrapForModalProps) { | |||
active={active} | |||
focusTrapOptions={{ | |||
trapStack: sharedTrapStack, | |||
allowOutsideClick: true, | |||
clickOutsideDeactivates: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamgrzybowski since you originally set this prop, are you fine with this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this because in our case clicking outside the modal closes it automatically. With clickOutsideDeactivate
the focus trap is deactivated instantly and the click behaviour is not modified (eg. input is focused correctly). WIth allowOutsideClick
focus trap isn't deactivated instantly but focus only temporarily leaves the trap and then returns only to be lost by closing modal.
@puneetlath could you check out this PR when you have some time? |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/puneetlath in version: 9.0.2-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
There were actually two bugs. We trapped focus on
Troubleshoot
andSave the world
pages. It also broke focus on other screens likeReport
in some circumstances (world of explanation here)Fixed Issues
$ #43766
PROPOSAL: N/A
Tests
Offline tests
Same as in Tests.
QA Steps
Same as in Tests
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
android-720.mov
Android: mWeb Chrome
android-web-480.mov
iOS: Native
ios-720.mov
iOS: mWeb Safari
ios-web-480.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov