Skip to content
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

[preact/compat] onTouchMoveCapture not processed #4237

Closed
1 task
shagr4th opened this issue Dec 19, 2023 · 0 comments · Fixed by #4243
Closed
1 task

[preact/compat] onTouchMoveCapture not processed #4237

shagr4th opened this issue Dec 19, 2023 · 0 comments · Fixed by #4243

Comments

@shagr4th
Copy link

shagr4th commented Dec 19, 2023

  • Check if updating to the latest Preact version resolves the issue

Describe the bug

I noticed the react-remove-scroll library is not working with preact/compat on a mobile device, because the event onTouchMoveCapture (and I think some others xxxCapture) is not processed at all.

To Reproduce

https://stackblitz.com/edit/create-preact-starter-qdpzqk?file=src%2Findex.jsx

Steps to reproduce the behavior: Open the stackblitz in a new window, then open Chrome Dev tools, then simulate a mobile device : no log is issued when I scroll the view. If I change to onTouchMove, it's working fine

Likely cause : the event method name is fully lowercased in compat/src/render.js, before the regex testing if the event ends with Capture, fails. (Because it's case sensitive, and ontouchmovecapture does not end with Capture)

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 a pull request may close this issue.

1 participant