Closed m-natarajan closed 1 year ago
Triggered auto assignment to @lschurr (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Job added to Upwork: https://www.upwork.com/jobs/~010303eb8cba36ffc8
Platforms
in OP are ✅)Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External
)
Clicking "Enter" key selects and unselects the user in group split bill
The OptionSelector
has a different focus system than the inbuilt browser one. This is caused due to the conflict between the two.
We should prevent the default browser focus by passing the prop shouldPreventDefaultFocusOnSelectRow
as !Browser.isMobile()
in MoneyRequestConfirmationList.js
here:
https://github.com/Expensify/App/blob/594551004f6d8e06beea6fc6dbd9f6a2166ab751/src/components/MoneyRequestConfirmationList.js#L554-L560
just like we do in other places like: https://github.com/Expensify/App/blob/594551004f6d8e06beea6fc6dbd9f6a2166ab751/src/pages/RoomInvitePage.js#L227 https://github.com/Expensify/App/blob/594551004f6d8e06beea6fc6dbd9f6a2166ab751/src/pages/iou/steps/MoneyRequstParticipantsPage/MoneyRequestParticipantsSelector.js#L292 https://github.com/Expensify/App/blob/594551004f6d8e06beea6fc6dbd9f6a2166ab751/src/pages/workspace/WorkspaceInvitePage.js#L276
Wherever we use the shouldPreventDefaultFocusOnSelectRow
, we are using the !Browser.isMobile()
as the value passed to it... So, I think we can refactor the code to have the default value of this prop set to !Browser.isMobile()
in the list items itself in components like BaseListItem.js
and OptionRow.js
.
@lschurr Let's close this as a dupe ^
Proposal
Please re-state the problem that we are trying to solve in this issue. Clicking "Enter" key selects and unselects the user in group split bill
What is the root cause of that problem? We were passing shouldPreventDefaultFocusOnSelectRow always false
What changes do you think we should make in order to solve the problem? in default props for OptionsSelector.js we should update shouldPreventDefaultFocusOnSelectRow to true. const defaultProps = { onSelectRow: undefined, textInputLabel: '', placeholderText: '', keyboardType: 'default', selectedOptions: [], headerMessage: '', canSelectMultipleOptions: false, shouldShowMultipleOptionSelectorAsButton: false, multipleOptionSelectorButtonText: '', onAddToSelection: () => { }, highlightSelectedOptions: false, hideSectionHeaders: false, boldStyle: false, showTitleTooltip: false, //here// shouldPreventDefaultFocusOnSelectRow: true }
What alternative solutions did you explore? (Optional) none
https://github.com/Expensify/App/assets/20947611/38960fa1-41fb-4b1c-9e4d-07de034986d1
Closing as a dupe.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.93.0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @dhanashree-sawant Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696935067155479
Action Performed:
Expected Result:
App should select the user and move on to next user on "enter" key click
Actual Result:
App select unselects same user every time on enter click on group split bill
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/38435837/e3b87934-9d54-495b-bb7d-e5a7511425b0 https://github.com/Expensify/App/assets/38435837/3680cb36-e9e3-4eba-a64d-8def1fbbe2b6 https://github.com/Expensify/App/assets/38435837/ec113508-a4b4-4eaf-90f9-0a017a6d8731 https://github.com/Expensify/App/assets/38435837/7bec80c9-4d7e-47c1-831d-56b665997062MacOS: Desktop
https://github.com/Expensify/App/assets/38435837/b523fc53-0f79-45a1-8845-541873f3f1ddView all open jobs on GitHub
Upwork Automation - Do Not Edit