Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

“tap” event is executed twice #55

Open
satrong opened this issue Mar 16, 2016 · 4 comments
Open

“tap” event is executed twice #55

satrong opened this issue Mar 16, 2016 · 4 comments

Comments

@satrong
Copy link

satrong commented Mar 16, 2016

When I add <meta name="viewport" content="width=device-width, initial-scale=1.0" /> in the head, “tap” event is executed twice on andriod 5.1.1/chrome 49.0.2623.91.

dom.addEventListener("tap",function(){
    alert('will alert twice');
})

if I edit the code like blow will be OK:

dom.addEventListener("tap",function(event){
   event.preventDefault();
    alert('will alert once');
})

it was a tap's BUG or my fault?

@tracid
Copy link

tracid commented Apr 15, 2016

Same Problem on all Apple mobile devices in Chrome/Safari... I use delegated events, maybe thats the problem?

@phillnexus
Copy link

Same issue in IE11 currently

@Namek
Copy link

Namek commented Jul 27, 2016

what is more, preventDefault() doesn't fix the issue on IE11. Neither return false does.

Note: may be related to #16 and #23.

@tmrk
Copy link

tmrk commented Oct 4, 2016

+1 to this, it's clearly a bug.

Any ideas how to solve it?

As mentioned, preventDefault() is not helping under IE.

langlangxu added a commit to langlangxu/tap that referenced this issue Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants