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

@touchstart event ? #29

Open
ghost opened this issue Oct 24, 2018 · 6 comments
Open

@touchstart event ? #29

ghost opened this issue Oct 24, 2018 · 6 comments

Comments

@ghost
Copy link

ghost commented Oct 24, 2018

Hi, I'm using your (very helpful) plugin with a true kiosk machine that has no real keyboard input. It works really well, however we noticed that some elderly customers long-press on screen and as the whole plugin is based on click events, they feel the screen as unresponsive (they should leave the finger to see the input changed). It's a subtle feeling but it's there, and I wonder if a touchstart event could be better suited for this kind of interaction.

Your thoughts ?

@icebob
Copy link
Owner

icebob commented Oct 24, 2018

Hi,
I'm using it with different touch displays and the problem is that some touch driver generates only click event. So the better way is to handle both events and avoid duplicated events. Because from touch events the browser generates click event too.

@ghost
Copy link
Author

ghost commented Oct 25, 2018

yeah, I see your point, will you accept a PR with this kind of change ?

https://codesandbox.io/s/lxq814kp0l

@icebob
Copy link
Owner

icebob commented Oct 25, 2018

Yes, of course.

By the way, what is in the codesandbox link?

@ghost
Copy link
Author

ghost commented Oct 25, 2018

Sorry I should have been more explicit:

@touchstart="method"
@click="method"

...

method(e) {
  e.preventDefault();  // prevents triggering click event when touchstart exists
}

@icebob
Copy link
Owner

icebob commented Oct 25, 2018

OK.

@andreasrein
Copy link

Any updates on this issue?

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