Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Consistent key press focus logic between composer and emoji picker #31899
Consistent key press focus logic between composer and emoji picker #31899
Changes from 4 commits
3bea1b5
bdbdc8c
1efd85d
bddf958
cb738e9
d0f3f30
ee9c915
363ccfa
3d4bd06
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Moving this condition could potencially change the behaviour - regardless of
e.key.length
value we will focus the input. Before we would return early from the the function without trigerringfocus()
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.
@robertKozik Because now we allow focus for
option
,cmd
, ... which isn't letter key so we should add this condition to prevent replace text when we focus on text input with this key.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.
Wasn't the main part of the issue to not focus on modifier keys? Copying from the expected behaviour:
The Emoji search field is not focused when clicking on Modifier keys
So we would need this condition to be shared between composer and emoji picker as well
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.
@robertKozik You're right. Updated with the correct expected.
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.
D we still need this condition @dukenv0307 ? Beforehand in
shouldAutoFocusOnKeyPress
we are checkingwhether e.key.length >1
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.
Yes we don't need this any more.
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.
@robertKozik Updated.