How to make a custom element active in Ionic?


I created custom html blocks to create a virtual keyboard. I’d like when the user holds a key, the color changes.

Here is a jsfiddle:
In summary, the important part of code looks like this:


In CSS, I have something like:

kbm-block {
  background: #3b65a7;

kbm-block:active {
  background: #123456;

It works on Chrome when holding click, but does nothing in Ionic when touching the buttons (they are not button actually). Any idea? Thanks!


Maybe this will help you: