pukhalski / tap

1Kb library for easy unified handling of user interactions such as mouse, touch and pointer events.
https://github.com/pukhalski/tap/archive/master.zip
MIT License
527 stars 45 forks source link

Flickerinig after tap event is caught #8

Closed PandaWood closed 10 years ago

PandaWood commented 10 years ago

I've just tried tap.js for the first time, replacing 'click' with 'tap' It works beautifully but the div containing the image being tapped (in my case the entire header area) gets a very noticeable flicker immediately after the event - on iPad (at least). Seemingly at the 300ms mark, actually.

I believe there was a flicker when using 'click' but only on the image being clicked. Now it's on a larger area.

Before I submit any details, is this known and are there ways to avoid it? I can foresee that I'm missing some basic CSS knowledge to accompany the use of tapjs... sorry if that's the case.

PandaWood commented 10 years ago

I think it was CSS knowledge, this fixed it -webkit-tap-highlight-color: rgba(0,0,0,0);

Or would it be appropriate to do this CSS within the library?

pukhalski commented 10 years ago

Hey.

At first, thanks for contributing in any manner. Then, yes, you found the right solution there.

It is pretty interesting situation. I guess, there's no need to change the basic browser behavior in this particular case because somehow it is an accessibility pattern of the platform, right?

Probably the best case will be to leave this decision up to developers.