When to use on-click or on-tap w/ Polymer?


I’ve researched a lot but still haven’t found a good answer. When should I use on-click and when on-tap, specifically w/ Polymer?

This guide focuses on programmatic event listeners, so isn’t helpful in that regard:



Use on-tap all the time, because the semantics of on-tap are better aligned with mobile devices than on-click.

For example, on-click does not fire if another finger is touching the screen, or if the element directly under the finger does not have a mouse handler. There are also some complications with getting on-click to work while you are scrolling. Use on-tap unless there is a compelling reason not to.

Answered By – Shailen Tuli

Answer Checked By – Candace Johnson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *