-
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
IOU - Keyboard arrow keys does not work inside description field #41777
Comments
Triggered auto assignment to @stephanieelliott ( |
We think this issue might be related to the #vip-vsb. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The arrow up/down key doesn't work in money request description page. What is the root cause of that problem?On the confirmation page, we use OptionsSelector which uses ArrowKeyFocusManager. There is currently no logic to unsubscribe the shortcut when the screen is out of focus. So, the arrow up/down key is consumed by the shortcut. Why did it work before? That's because we are excluding a TEXTAREA element.
However, the description field now is a live markdown input which is a DIV. But instead of excluding specific tag, we should disable the shortcut when the screen is not focused anymore. I think we need a new way to exclude the live markdown input, but I guess that's not the focus of this issue. OptionsSelector component itself is deprecated and is in progress to be replaced and ArrowKeyFocusManager will also probably be removed, however, this issue also happens in SelectionList. The shortcut is always enabled. App/src/components/SelectionList/BaseSelectionList.tsx Lines 230 to 234 in 55c56bf
What changes do you think we should make in order to solve the problem?In ArrowKeyFocusManager, we can unsub the shortcut when isFocused is false and subscribe it back when isFocused is true. App/src/components/ArrowKeyFocusManager.js Lines 64 to 71 in 55c56bf
Or we can simply return the children here when isFocused is false App/src/components/ArrowKeyFocusManager.js Lines 126 to 136 in 55c56bf
For the selection list fix, we can set the isActive to isFocused
or to App/src/components/SelectionList/BaseSelectionList.tsx Lines 498 to 513 in 55c56bf
If we want to improve the excludedNodes so it can exclude the live markdown element, we can refactor the excludedNodes code here so it becomes a function and returns a boolean. App/src/libs/KeyboardShortcut/bindHandlerToKeydownEvent/index.ts Lines 23 to 30 in 55c56bf
excludedNodes will return true if it's a live markdown. We can check if |
This is pretty minor and only affects web, I don't think we should prioritize this right now. |
@stephanieelliott Eep! 4 days overdue now. Issues have feelings too... |
@stephanieelliott Still overdue 6 days?! Let's take care of this! |
Oops, had meant to close as not a priority |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.71-0
Reproducible in staging?: Y
Reproducible in production?: Y
Found when executing PR : #41291
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Cursor jumps to previous line when pressing up arrow
Actual Result:
When user presses on the up arrow key nothing happens
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6473883_1715095823382.bandicam_2024-05-07_18-25-25-017.mp4
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: