You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2025-08-15] [$250] Workspace - Usd currency changed displays blue border. #66693
Version Number: V9.1.83-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from TestRail:#66275 Email or phone of affected tester (no customers): Slottwo1 82@gmail.com Issue reported by: Applause Internal Team Device used: Redminote 10s android 13 App Component: Workspace Settings
The modal window from react-native has a default behavior of returning focus to the active element state when the modal window is closed, which is why, after we have something entered in the init and we select an element, the modal window closes and the focus returns to the previous active element, which is why we give box-shadow for elements that have :focus or :focus-visible state
And react-native, in turn, supports the wcag 2.1 recommendations (https://www.w3.org/TR/WCAG21/#focus-order), as a result of which, when the window is closed, the focus returns to the last active element, which in our case is the Currency picker button that was clicked before(https://www.w3.org/TR/WCAG21/#focus-visible means that when you click a button, the focus moves to it and this focus should be visible. Restoring focus to the button after a modifier helps to meet this requirement).
What changes do you think we should make in order to solve the problem?
In this case, we do not need this behavior, so for this component, you can add a call to the blurActiveElement function when selecting the active element:
Here is a video that shows that this is the default behavior of this modal window, if you remove focus from the inlet before selecting an element, then the previous element will not be focused
2025-07-18.11.52.38.mov
We can also make this props dynamically and by default it will be false, and in this case pass it as true(Or we can add this prop to modal if needed)
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
Please re-state the problem that we are trying to solve in this issue.
Usd currency changed displays blue border .
What is the root cause of that problem?
When we open the modal and focus on the input, it becomes document.activeElement. When we type in the input, the browser will turn on the "hadKeyboardEvent" flag.
When closing the modal (removing from the DOM), the input loses focus. The browser immediately looks for the next element in the DOM tree that can receive focus and assigns focus to it. Because MenuItemWithTopDescription is next to it and can receive focus due to PressableWithFeedback. Together with the above flag and having focus, the outline will appear
What changes do you think we should make in order to solve the problem?
We need to make sure that when the SelectionList is unmounted (like by closing the modal) the input of the SelectionList is no longer an activeElement:
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Or do only for CurrencyPicker
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
changed the title [-][$250] Workspace - Usd currency changed displays blue border.[/-][+][Due for payment 2025-08-15] [$250] Workspace - Usd currency changed displays blue border.[/+]on Aug 8, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@ZhenjaHorbach@lydiabarclay The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
1a. Result of the original design (eg. a case wasn't considered)
1b. Mistake during implementation
1c. Backend bug
1z. Other:
Where bug was reported:
2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
2b. Reported on staging (eg. found during regression or PR testing)
2d. Reported on a PR
2z. Other:
Who reported the bug:
3a. Expensify user
3b. Expensify employee
3c. Contributor
3d. QA
3z. Other:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Unfortunately, I did not find a suitable PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Jul 18, 2025
Triggered auto assignment to @lydiabarclay (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.Eskalifer1 commentedon Jul 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Workspace - Usd currency changed displays blue border
What is the root cause of that problem?
The reason for this behavior is that we now use a
ReanimatedModal for the currency selection componentApp/src/components/CurrencyPicker.tsx
Line 112 in 4a14376
This modal is based on the
Modalfromreact-native:App/src/components/Modal/ReanimatedModal/index.tsx
Line 4 in dfbbfcc
The modal window from react-native has a default behavior of returning focus to the active element state when the modal window is closed, which is why, after we have something entered in the init and we select an element, the modal window closes and the focus returns to the previous active element, which is why we give box-shadow for elements that have :focus or :focus-visible state
And react-native, in turn, supports the wcag 2.1 recommendations (https://www.w3.org/TR/WCAG21/#focus-order), as a result of which, when the window is closed, the focus returns to the last active element, which in our case is the Currency picker button that was clicked before(https://www.w3.org/TR/WCAG21/#focus-visible means that when you click a button, the focus moves to it and this focus should be visible. Restoring focus to the button after a modifier helps to meet this requirement).
What changes do you think we should make in order to solve the problem?
In this case, we do not need this behavior, so for this component, you can add a call to the blurActiveElement function when selecting the active element:
App/src/components/CurrencyPicker.tsx
Lines 75 to 78 in dfbbfcc
Here is a video that shows that this is the default behavior of this modal window, if you remove focus from the inlet before selecting an element, then the previous element will not be focused
2025-07-18.11.52.38.mov
We can also make this props dynamically and by default it will be false, and in this case pass it as true(Or we can add this prop to modal if needed)
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
N/A
What alternative solutions did you explore? (Optional)
Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
dmkt9 commentedon Jul 18, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Usd currency changed displays blue border .
What is the root cause of that problem?
document.activeElement. When we type in the input, the browser will turn on the "hadKeyboardEvent" flag.MenuItemWithTopDescriptionis next to it and can receive focus due toPressableWithFeedback. Together with the above flag and having focus, the outline will appearWhat changes do you think we should make in order to solve the problem?
We need to make sure that when the SelectionList is unmounted (like by closing the modal) the input of the SelectionList is no longer an
activeElement:App/src/components/SelectionList/index.tsx
Lines 53 to 56 in 5c2f566
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
NA
What alternative solutions did you explore? (Optional)
Or do only for
CurrencyPickerReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.
melvin-bot commentedon Jul 21, 2025
@lydiabarclay Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jul 21, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021947440784440270101
[-]Workspace - Usd currency changed displays blue border.[/-][+][$250] Workspace - Usd currency changed displays blue border.[/+]melvin-bot commentedon Jul 21, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (
External)20 remaining items
[-][$250] Workspace - Usd currency changed displays blue border.[/-][+][Due for payment 2025-08-15] [$250] Workspace - Usd currency changed displays blue border.[/+]melvin-bot commentedon Aug 8, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Aug 8, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.90-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2025-08-15. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Aug 8, 2025
@ZhenjaHorbach @lydiabarclay The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
lydiabarclay commentedon Aug 13, 2025
@ZhenjaHorbach can you please fill out the BZ checklist? Thanks!
ZhenjaHorbach commentedon Aug 14, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Unfortunately, I did not find a suitable PR
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/536787
Regression Test Proposal
Test:
Do we agree 👍 or 👎
lydiabarclay commentedon Aug 15, 2025
Payment Summary
Contributor: @thelullabyy paid $250 via Upwork
Contributor+: @ZhenjaHorbach due $250 via NewDot
✅ Regression test filed
ZhenjaHorbach commentedon Aug 15, 2025
Requested in ND !
quinthar commentedon Aug 28, 2025
$250 approved for @ZhenjaHorbach