Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

mdGesture hijacked link click events don't work with plain old anchor tags #1792

Closed
alexbr opened this issue Mar 5, 2015 · 6 comments
Closed
Assignees
Milestone

Comments

@alexbr
Copy link

alexbr commented Mar 5, 2015

Preconditions

  • Use a mobile device (or sending a mobile user-agent header)
  • jQuery is loaded

Bug

When mdGesture hijacks a link click event and decides the event should continue propagating, it passes the event to jQueryDispatchEvent which calls jQuery's trigger method. This ultimately fails because jQuery does not fire native click events. This ultimately means that clicking on simple anchor links like <a href="http://some.site.com">Link</a> doesn't work at all.

See my plunker example here to reproduce: http://plnkr.co/edit/RtuCcILOWvlQIWs89U6n?p=preview

@sime
Copy link

sime commented Mar 26, 2015

I can replicate this without jQuery: http://codepen.io/anon/pen/zxejXe

@ThomasBurleson
Copy link
Contributor

Still present in latest code from master. See CodePen. Issue appears to be the event dispatched here;

@ThomasBurleson ThomasBurleson added the for: internal contributor The team will address this issue and community PRs are not requested. label Apr 2, 2015
@NorikDavtian
Copy link

+1

Disabling shouldHijackClicks event fixes this as a temporary fix..

@ThomasBurleson ThomasBurleson removed the for: internal contributor The team will address this issue and community PRs are not requested. label Apr 9, 2015
@kennethcachia
Copy link
Contributor

This should be fixed.

Demo with jQuery: http://codepen.io/kennethcachia/pen/azgwWg
Demo without jQuery: http://codepen.io/kennethcachia/pen/EaBQwL

@ThomasBurleson
Copy link
Contributor

Fixed with 2c57a82

@sime
Copy link

sime commented Apr 10, 2015

Works for me on Chrome DevTools device mode and Safari in iOS Simulator.

Cheers!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants