vue-touch-keyboard icon indicating copy to clipboard operation
vue-touch-keyboard copied to clipboard

@touchstart event ?

Open ghost opened this issue 7 years ago • 6 comments

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 ?

ghost avatar Oct 24 '18 10:10 ghost

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.

icebob avatar Oct 24 '18 16:10 icebob

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

https://codesandbox.io/s/lxq814kp0l

ghost avatar Oct 25 '18 12:10 ghost

Yes, of course.

By the way, what is in the codesandbox link?

icebob avatar Oct 25 '18 12:10 icebob

Sorry I should have been more explicit:

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

...

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

ghost avatar Oct 25 '18 12:10 ghost

OK.

icebob avatar Oct 25 '18 12:10 icebob

Any updates on this issue?

andreasrein avatar Mar 05 '19 13:03 andreasrein