No click action on button scaled-down if active

 Scaling down the size of a button on the 'active' state means the JavaScript action does not fire on the outer parts of the button.


I am animating my buttons on the 'hover' and 'active' states. I use 'scale3d' and 'rotate3d' as I am already setting the background color. I have 'input' elements with a 'type' of 'button' which have no content so I cannot have ':before' or ':after' elements.  I set a zero transition time for the 'active' state and a longer transition time on the button element.  Therefore the button is immediately transformed and then more slowly springs back into its original shape. 


My problem is that when I click on the button, it is immediately scaled down, so on the outer parts of the button the click is no longer inside the button, and so the JavaScript action does not fire.


My soluation is to instead use rotations on the 'x' and 'y' axis of 180 degrees.


There are more tips at: [bbingo.xyz/t](http://bbingo.xyz/t)


There are more tips at: bbingo.xyz/techtips/

Comments

Popular posts from this blog

webkit-tap-highlight-color in CSS

Steve Jobs quotes