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

allow parent element to scroll with touch #128

Open
shdanesh2024 opened this issue Jul 13, 2023 · 2 comments
Open

allow parent element to scroll with touch #128

shdanesh2024 opened this issue Jul 13, 2023 · 2 comments

Comments

@shdanesh2024
Copy link

shdanesh2024 commented Jul 13, 2023

HI.
when the ReactSketchCanvas is inside a scrollable component, the ReactSketchCanvas component prevents dragging to reach the parent element. and it is ok if allowOnlyPointerType='all' because the events are used to draw! but what if allowOnlyPointerType='pen. ' now other events like touch and ... could potentially be used to scroll the parent.
thanks

@shdanesh2024
Copy link
Author

shdanesh2024 commented Jul 13, 2023

I think the problem is here at canvas.index.tsx: I removed the touch-action: none and managed to activate/deactivate it just when the pointer type is pen via toggling a css class. it works somehow but is not prefect. is there any smarter way?
style={{ // touchAction: 'none', width, height, ...style, }}

@ljk1291
Copy link

ljk1291 commented Aug 26, 2023

@shdanesh2024 Did you manage to find a solution for this?

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

No branches or pull requests

2 participants