javascript - How do I make onclick event skip to offclick? -


i making virtual keyboard touchscreen computer. using angular, html, , css only. how make when touch key, if holding key down, click forced "lift mouse up."

the reason asking because when touching 2 characters within 500ms-1000ms, ends not registering click.

if have tips improving touchscreen usability feel free comment :)

open demo on touch device test: http://jsbin.com/nibohe/4/

to native app feel (touch / mouse) ux:

$keybkeyelement.on("touchstart mousedown", function( event ){     event.preventdefault();     // capture key     // send character textarea     // other stuff }); 

if use click event on touchscreen have to

  • wait user's ~300+ ms up movement
  • ~400ms delay browser make valid click event.

where touchstart end event.preventdefault kill click, mousedown or other events used on desktop (non/touch) machines.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -