-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 payment 2022-04-12] [$250] Android - Emoji- Emoji is selected only on second tap #8110
Comments
Triggered auto assignment to @johnmlee101 ( |
K reproduced. Opening this up to external. I'm guessing it has to do with focus of the picker |
Triggered auto assignment to @kevinksullivan ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Triggered auto assignment to @tgolen ( |
ProposalThe issue is happen because the keyboard is still visible after the modal show, show the first press is for dismissing the keyboard then the second press is for selecting emoji. My solution is to dismiss the keyboard when emoji button is pressed to open emoji modal. App/src/components/EmojiPicker/EmojiPickerButton.js Lines 27 to 34 in 7919e24
- onPress={() => EmojiPickerAction.showEmojiPicker(props.onModalHide, props.onEmojiSelected, emojiPopoverAnchor)}
+ onPress={() => {
+ /* Dismiss the keyboard before opening the modal, this will prevent double press when selecting emoji */
+ Keyboard.dismiss();
+ EmojiPickerAction.showEmojiPicker(props.onModalHide, props.onEmojiSelected, emojiPopoverAnchor);
+ }} Also we need to add the timeout time from 50 to 100 to make room for keyboard opening.
- setTimeout(() => this.textInput.focus(), 50);
+ setTimeout(() => this.textInput.focus(), 100); ResultScreen.Recording.2022-03-16.at.22.42.52.mov |
@mollfpr Thank you for the proposal! It looks mostly good to me, but I did have a question.
From watching your video, it doesn't look to me like the keyboard is open before the modal opens, so then why does the keyboard need to be dismissed? |
@tgolen Ahh I forget about that. I should use this code instead. I use hoc /* Dismiss the keyboard before opening the modal, this will prevent double press when selecting emoji */
if (props.isShown) {
Keyboard.dismiss();
}
EmojiPickerAction.showEmojiPicker(props.onModalHide, props.onEmojiSelected, emojiPopoverAnchor); |
Ah, OK. That sounds good. Thank you! I'm not too excited about changing the 🟢 to hire @mollfpr with that proposal @kevinksullivan |
Hired @mollfpr , go ahead and accept whenever you get a chance! |
@Santhosh-Sellavel what Android version do you use? |
@mollfpr I am using a Android 12 |
@Santhosh-Sellavel @tgolen I found the culprit. We need to make the text input unfocus. There are two approaches to do this.
/* Dismiss the keyboard before opening the modal, this will prevent double press when selecting emoji */
- if (props.isShown) {
Keyboard.dismiss();
- }
/** Unfocusing the text input to prevent double press when select a emoji */
if (props.textInput) {
props.textInput.blur();
} Before either above solution appliedScreen.Recording.2022-03-19.at.10.02.25.movWith
|
componentDidMount() { | |
this.emojiPopoverDimensionListener = Dimensions.addEventListener('change', this.measureEmojiPopoverAnchorPosition); | |
} | |
// eslint-disable-next-line rulesdir/prefer-early-return
componentDidUpdate(prevProps, prevState) {
if (prevState.isEmojiPickerVisible !== this.state.isEmojiPickerVisible) {
Keyboard.dismiss();
}
}
Result
Screen.Recording.2022-03-19.at.10.24.49.mov
@tgolen @Santhosh-Sellavel updated PR. |
PR is merged! |
Issue not reproducible during KI retests. (First week) |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.49-1 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 2022-04-12. 🎊 |
Applied for C+ @kevinksullivan |
Hired @Santhosh-Sellavel . |
Issue not reproducible during KI retests. (Second week) |
Paid. Thanks again @Santhosh-Sellavel @mollfpr ! |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Emoji is selected on first tap
Actual Result:
Emojie is selected only on second tap
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.42.3
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers): hateemshafi00@gmail.com
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Bug5487377_20220311_234129.mp4
Expensify/Expensify Issue URL:
Issue reported by: Applause (Exploratory)
Slack conversation:
Job Post: https://www.upwork.com/jobs/~01d711814db7c31f61
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: