-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[HOLD for #42645] [$250] Chat - Focus Sticks on Cancel Button After Clearing Message & Saving with Enter Key #39820
Comments
Triggered auto assignment to @isabelastisser ( |
@isabelastisser FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
We think that this bug might be related to #vip-vsp |
ProposalPlease re-state the problem that we are trying to solve in this issue.Using up and down arrow keys doesn't change the button focus on confirm modal. What is the root cause of that problem?We don't support up and down arrow keys functionality in What changes do you think we should make in order to solve the problem?Handle up and down keyboard keys like this:
Then, pass the refs to the buttons. |
Job added to Upwork: https://www.upwork.com/jobs/~0125e80c6474a3886e |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @shubham1206agra ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Focus Sticks on Cancel Button After Clearing Message & Saving with Enter Key What is the root cause of that problem?There no logic to handle keyboard input in What changes do you think we should make in order to solve the problem?App/src/components/ConfirmContent.tsx Lines 140 to 181 in dd30d13
Additionally
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Focus Sticks on Cancel Button After Clearing Message & Saving with Enter Key What is the root cause of that problem?The issue happens because we set
What changes do you think we should make in order to solve the problem?We should create a ref ResultAlternativelyWe can use |
ProposalPlease re-state the problem that we are trying to solve in this issue.Chat - Focus Sticks on Cancel Button After Clearing Message & Saving with Enter Key What is the root cause of that problem?We don't have any event handlers for up and down arrow keys. That's why doesn't have focus change when we press up and down arrow keys. What changes do you think we should make in order to solve the problem?We can make use of
const [focusedIndex, setFocusedIndex] = useArrowKeyFocusManager(
{
maxIndex: 1,
initialFocusedIndex: 0,
}
)
ref={(ref) => {
if (!ref) {
return;
}
buttonRefs.current.push(ref);
}}
useKeyboardShortcut(
CONST.KEYBOARD_SHORTCUTS.ARROW_UP,
() => {
if (!(focusedIndex > 0)) {
return;
}
setFocusedIndex(focusedIndex - 1);
}
);
useKeyboardShortcut(
CONST.KEYBOARD_SHORTCUTS.ARROW_DOWN,
() => {
if (focusedIndex === buttonRefs.current.length - 1) {
return;
}
setFocusedIndex(focusedIndex + 1);
}
); Sure we can refactor conditions. With help of Screen.Recording.2024-04-08.at.9.28.57.PM.movWhat alternative solutions did you explore? (Optional) |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
|
Hey @shubham1206agra, can you please review the proposals above? Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Bump @shubham1206agra to review the proposals above. I will DM you too for visibility. Thanks! |
I remember arrow keys were supported earlier in this modal. Can someone check if that was the case. |
@shubham1206agra can you post in open source to confirm? Thanks! |
@isabelastisser, @shubham1206agra Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Not overdue, we're still discussing this. |
Any updates, @shubham1206agra ? I can bump the slack discussions. |
@isabelastisser Please do that. |
@isabelastisser, @shubham1206agra Whoops! This issue is 2 days overdue. Let's get this updated quick! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@shubham1206agra, sorry for the delay in responding! I can't find the discussion in Slack. Can you please share the link so I can comment? Thanks! |
waiting for answer in slack. |
Hey @shubham1206agra, please confirm if you can still reproduce this, and if son, let's pick a proposal then. Thanks! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Bump @shubham1206agra on my comment above. |
I can still repro the bug. |
@shubham1206agra any updates here? Thanks! |
@isabelastisser, this seems to be fixed for me in production. You may close this issue. |
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.4.61-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: N/A
Email or phone of affected tester (no customers): abebemiherat@gmail.com
Issue reported by: Applause - Internal Team
Action Performed:
1, Write a comment and hover over it, then click edit
2, Clear the message and press the Enter key
3, Observe that the focus remains on the "Cancel" button, preventing the deletion of the comment using the Enter key
Expected Result:
The focus should not remain on the "Cancel" button when attempting to clear the message and save changes using the Enter key. The user should be able to delete the comment using the Enter key
Actual Result:
The focus remains on the "Cancel" button when attempting to clear the message and save changes using the Enter key. The user is unable to delete the comment using the Enter key
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6442203_1712579440754.edit.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: