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

pointertap event doesn't work for ScrollBox items on mobile phone #100

Closed
gagrison opened this issue Oct 2, 2023 · 11 comments · Fixed by #129
Closed

pointertap event doesn't work for ScrollBox items on mobile phone #100

gagrison opened this issue Oct 2, 2023 · 11 comments · Fixed by #129
Assignees
Labels
bug Something isn't working

Comments

@gagrison
Copy link

gagrison commented Oct 2, 2023

Expected Behavior

pointertap event should work for items added inside ScrollBox

Current Behavior

pointertap event doesn't work for ScrollBox items

Steps to Reproduce

Create container with sprite inside, add pointertap event on it. Make sure that there is enough height so scroll can be done. Add it to ScrollBox. Open application on mobile phone and try to click.

Environment

  • version: 0.9.0
  • Browser & Version: Chrome 117.0.5938.140
  • OS & Version: Android 13, Samsung SM-A536B
@gagrison gagrison added the bug Something isn't working label Oct 2, 2023
@CyberDex
Copy link
Member

@gagrison
Tried to reproduce this one, but no luck. Can you make some example on sandbox?
There is also a small thing to doublecheck:
in case if you are dragging a scrollbox even 1px, button event should not fire.
This is a fix in case clicks on buttons is not intentional, but actually it is pressed to drag a scrollbox.

@gagrison
Copy link
Author

Maybe this info will help. I made my own scroll box, and I had the same issue as reported here. I also made it that when you drag at least 1px all events are not propagated. But before that, I found out that globaltouchmove event is triggered on phones on touch with 0px drag (event.global.y).

@CyberDex
Copy link
Member

Tested on both iPhone and Adnroid, both are firing pointertap event no problem.
Can you reproduce your example in sandbox? Like https://codesandbox.io/

@gagrison
Copy link
Author

If I find time I will. Since I made my own scrollbox this is not a priority sorry.

@gagrison
Copy link
Author

@CyberDex here you go link

@CyberDex
Copy link
Member

CyberDex commented Nov 4, 2023

@gagrison Thank you. Tried to reproduce on iphone and android, and all seems to work fine. Is it some specific device you are experiencing this on?

@gagrison
Copy link
Author

gagrison commented Nov 4, 2023

I already wrote it. I also tried on Samsung S23+, same thing.

@thpoul
Copy link

thpoul commented Jan 21, 2024

Bump :) Having the exact same issue on Pixel 4a.

@thpoul
Copy link

thpoul commented Jan 21, 2024

It doesn't work on the official storybook either (both using sprite/graphics). It's important not to use an emulator but a physical device.

Edit: it works only if the touch is blazing fast.

@CyberDex
Copy link
Member

@gagrison @thpoul Guys could you please check if v 0.10.4 fixes your problem?

@gagrison
Copy link
Author

gagrison commented Feb 1, 2024

@gagrison @thpoul Guys could you please check if v 0.10.4 fixes your problem?

It does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants