6

Most trackpads on laptops have a tap-to-click option/feature where light taps are recognized as presses (either pressing one of the trackpad buttons or pressing down on the trackpad surface on buttonless trackpads) and trigger a click. I've noticed on my Macbook Pro that CSS :active styles aren't applied to HTML elements if I tap on my trackpad; they're only applied if I press down on the trackpad and it clicks.

Is there a way to make trackpad taps (not mobile touchscreen taps) trigger the :active state?

clickbait
  • 2,602
  • 1
  • 23
  • 54
  • 1
    my trackpad (macbook) with a simple tap - not pressing - does cause the `:active` pseudo-state to be applied – danyamachine Sep 27 '16 at 02:43
  • 1
    See [How to pass css :active pseudo class to javascript?](http://stackoverflow.com/questions/39966288/how-to-pass-css-active-pseudo-class-to-javascript) – guest271314 Oct 12 '16 at 06:32

1 Answers1

7

How events like these are registered (touch pad taps, and clicks) are processed by the operating system / the browser, and there isn't a way to register this through CSS/JS as danyamachine said it works on his device, this could because he was using a different browser that handles clicks vs taps differently

Dylan
  • 911
  • 1
  • 13
  • 21