ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.65k stars 3.22k forks source link

'targetElement.tagName' is undefined #471

Open sentience opened 8 years ago

sentience commented 8 years ago

We’re seeing errors thrown by IE Mobile 11.0 users on Windows Phone 8.1, where targetElement does not have a value on this line:

https://github.com/ftlabs/fastclick/blob/master/lib/fastclick.js#L559

Unfortunately we don’t have access to such a device to do our own testing on this.

If there is no desire to support IE Mobile 11.0 as a browser, we could eliminate the error by returning false if targetElement is not set at this point, but I wonder if that would have any unwanted side-effects?

sentience commented 8 years ago

Update: We’re also seeing this on iOS browsers (Mobile Safari and Chrome) as well. We’ve been unable to reproduce the issue, but we’re seeing a steady stream of them in our client side error logging.

ThatsMrTalbot commented 8 years ago

Any update on this?

sentience commented 8 years ago

Nothing new to report. We’re still seeing this issue.

ThatsMrTalbot commented 8 years ago

We are having this issue as well. I created a fork with some defensive coding around targetElement in order to stop the exception being thrown. The pull request is here (#479) if you have any comments.