Skip to content

[preact/compat] onTouchMoveCapture not processed #4237

@shagr4th

Description

@shagr4th
  • 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions