googlearchive / polymer-gestures

84 stars 27 forks source link

Error in iOS emulation mode in Chrome #53

Closed MaKleSoft closed 10 years ago

MaKleSoft commented 10 years ago

When emulating any iOS device in Chrome, I get this error:

Uncaught TypeError: Cannot read property 'addEventListener' of null
    platform-events.js:35(anonymous function)
    platform-events.js:35(anonymous function)

Here is the relevant portion of the code:

  if (isSafari) {
      // This line throws the exception
      document.body.addEventListener('touchstart', function(){});
  }

I'm guessing this is a bug in Chrome rather than Polymer, but I decided to report it here since the issue did not occur in previous polymer versions (e.g. v0.3.2).

MaKleSoft commented 10 years ago

Maybe this is related to #33?

sbmaxx commented 10 years ago

I made pull request for this ;) https://github.com/Polymer/polymer-gestures/pull/47

dfreedm commented 10 years ago

I think it might be premature to mark this as closed from #47, so I'll reopen.

@MaKleSoft, can you confirm that this fixes your issue?

MaKleSoft commented 10 years ago

I'll test this as soon as it lands in the Polymer/polymer bower package. But looking at the PR, it seems likely that it solves the problem.

MaKleSoft commented 10 years ago

Sorry, forgot that this is still open. Yeah, it's fixed.

jenyckee commented 9 years ago

I'm still having the same problem on ipad and chrome ipad emulation this project, https://github.com/jenyckee/disco Chrome Version 41.0.2272.118 (64-bit)