Skip to content

[fix] Pressable suppression of contextmenu on windows #2316

Closed
yuxizhe wants to merge 2 commits intonecolas:masterfrom
yuxizhe:feat-windows-contextmenu
Closed

[fix] Pressable suppression of contextmenu on windows #2316
yuxizhe wants to merge 2 commits intonecolas:masterfrom
yuxizhe:feat-windows-contextmenu

Conversation

@yuxizhe
Copy link
Contributor

@yuxizhe yuxizhe commented Jun 28, 2022

Fix #2296
Long-press with a touch on a Pressable does not suppress the contextmenu on Windows. On iOS and Android, the contextmenu is triggered while the pointer is down, after a certain length of time. However, on Windows, the contextmenu is displayed after pointerup (with the same timestamp as pointerup), whether triggered by a mouse right-click or a touch long-press.

before:
Jun-28-2022 15-48-53

after:
Jun-28-2022 15-50-21

@yuxizhe yuxizhe force-pushed the feat-windows-contextmenu branch 2 times, most recently from d835c12 to 41ff24d Compare June 28, 2022 10:02
@yuxizhe yuxizhe changed the title fix: pressable suppression of contextmenu on windows [fix] Pressable suppression of contextmenu on windows Jun 28, 2022
@yuxizhe yuxizhe changed the title [fix] Pressable suppression of contextmenu on windows [fix] Pressable suppression of contextmenu on windows Jun 28, 2022
@yuxizhe yuxizhe force-pushed the feat-windows-contextmenu branch from 41ff24d to 3da3bbe Compare June 28, 2022 19:27
@yuxizhe yuxizhe force-pushed the feat-windows-contextmenu branch from 3da3bbe to 63521d0 Compare June 28, 2022 19:49
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 28, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit cc3f216:

Sandbox Source
examples Configuration

@necolas
Copy link
Owner

necolas commented Jun 29, 2022

I noticed codesandbox ci didn't replace the version for babel-plugin-react-native-web in the package.json: https://codesandbox.io/s/examples-fdt05h?file=/package.json

@yuxizhe
Copy link
Contributor Author

yuxizhe commented Jun 29, 2022

I noticed codesandbox ci didn't replace the version for babel-plugin-react-native-web in the package.json: https://codesandbox.io/s/examples-fdt05h?file=/package.json

It seems we have to move babel-plugin-react-native-web from devDependencies to dependencies.

this is my test: https://codesandbox.io/s/examples-858bn5?file=/package.json

@necolas necolas added this to the 0.18.x milestone Jul 3, 2022
@necolas necolas closed this in 4a9bea2 Jul 19, 2022
rnike pushed a commit to VeryBuy/react-native-web that referenced this pull request Sep 13, 2022
Long-press with a touch on a Pressable does not suppress the contextmenu
on Windows. On iOS and Android, the contextmenu is triggered while the
pointer is down, after a certain length of time. However, on Windows,
the contextmenu is displayed after pointerup (with the same timestamp as
pointerup), whether triggered by a mouse right-click or a touch
long-press.

Fix necolas#2296
Close necolas#2316
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressable suppression of contextmenu on Windows

2 participants