7

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,818
  • 1
  • 25
  • 61
  • 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

8

Touch pad taps and clicks are processed by the operating system and/or the browser. There isn't a way to register Clicks between Taps through CSS or JS. For example: @danyamachine said it works on his MacBook, this is most likely because he was using a different browser that handles clicks vs taps differently.

Dylan
  • 1,071
  • 1
  • 12
  • 24