googlearchive / polymer-gestures

84 stars 27 forks source link

tap doesn't work in Firefox and IE11 #62

Closed frankiefu closed 10 years ago

frankiefu commented 10 years ago

On Firefox 32.0.3 using polymer-gestures#master, the tap event doesn't work.

<!doctype html>
<html>
<head>
  <script src="components/platform/platform.js"></script>
  <link rel="import" href="components/polymer/polymer.html">

</head>
<body>

  <polymer-element name="x-test">
    <template>
      <style>
        :host {
          display: block;
        }
      </style>
      <button on-tap="{{tapHandler}}">Tap Me!</button>
    </template>
    <script>
      Polymer('x-test', {
        tapHandler: function() {
          console.log('tapped!!!');
        }
      });
    </script>
  </polymer-element>

  <x-test></x-test>

</body>
</html>
frankiefu commented 10 years ago

Also not working in IE11

dfreedm commented 10 years ago

Looks like 748b65cdb3e0d972a4ca345421927f75f1f55d19 is to blame. Investigating.

dfreedm commented 10 years ago

Ugh, buttons property on mouseup is 0 in Firefox. Guess I'll have to add a workaround.

steida commented 10 years ago

I really don't understand why Polymer team decided to not use the best tested and robust library, from the same company -> Google Closure Library. As result, you have to reinvestigate and reinvent a lot of issues and code. https://github.com/google/closure-library/blob/master/closure/goog/events/browserevent.js#L297

frankiefu commented 10 years ago

https://github.com/Polymer/polymer-gestures/commit/39d8ed9cd074bbc6aa5afeec1e5df46908f16a4e fixes the issue in Firefox, but not IE11.

dfreedm commented 10 years ago

Fixed in 82a3b23