-
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
fix: long press on emoji doesn't show highlight in mobile #26931
Conversation
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-09-12.at.2.51.07.AM.movMobile Web - ChromeScreen.Recording.2023-09-12.at.2.48.00.AM.movMobile Web - SafariScreen.Recording.2023-09-12.at.2.39.49.AM.movDesktopScreen.Recording.2023-09-12.at.3.01.22.AM.moviOSScreen.Recording.2023-09-12.at.2.41.26.AM.movAndroidScreen.Recording.2023-09-12.at.2.45.42.AM.mov |
@allroundexperts |
src/components/Pressable/GenericPressable/BaseGenericPressable.js
Outdated
Show resolved
Hide resolved
@s-alves10 I'm still having the following issue on iOS safari some times. Screen.Recording.2023-09-11.at.12.32.49.AM.mov |
When releasing the emoji item quickly, In order to prevent this, we need to set the long press handler to () => {} only on android chrome |
Please take a look again |
@allroundexperts as explained here #24654 (comment) I think that you need to fix this in onHoverOut because we are in mobile |
I don't understand what you're saying. My solution includes all the fix you mentioned already. Can you be more specific? |
@s-alves10 The suggestion is to use |
What do you think? |
@s-alves10 @allroundexperts I agree makes more sense, even if you review the doc https://necolas.github.io/react-native-web/docs/pressable/ but from my previous tests with onHoverOut it was working fine. I tested with android simulated, and maybe tha is the reason why was working, maybe the key is to test in a real device ? Sorry I dont want to add more noise to this defect. Hope this helps. |
Please let me know your thought on #26931 (comment) |
If your fix solves the issue, then I think there's no need to change it to |
Please take a look at the PR again, then |
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.
This is testing well!
Please take a look at this PR |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/bondydaa in version: 1.3.71-0 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.71-12 🚀
|
@@ -127,13 +128,15 @@ const GenericPressable = forwardRef((props, ref) => { | |||
return KeyboardShortcut.subscribe(shortcutKey, onPressHandler, descriptionKey, modifiers, true, false, 0, false); | |||
}, [keyboardShortcut, onPressHandler]); | |||
|
|||
const defaultLongPressHandler = Browser.isMobileChrome() ? () => {} : undefined; |
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.
Passing a default handler prevents browser native events which caused #28915
Details
Fix not to show highlight when long pressing emojis in android chrome
Fixed Issues
$ #24654
PROPOSAL: #24654 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
24654_mac_chrome.mp4
Mobile Web - Chrome
24654_android_chrome.mp4
Mobile Web - Safari
24654_ios_safari.mp4
Desktop
24654_mac_desktop.mp4
iOS
24654_ios_native.mp4
Android
24654_android_native.mp4