Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Wrap nodes before calling PolymerGestures.addEventListener and remove…
Browse files Browse the repository at this point in the history
…EventListener

Fixes googlearchive/polymer-gestures#52
  • Loading branch information
dfreedm committed Aug 29, 2014
1 parent a23f43d commit 8d32e76
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/instance/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@
scope.api.instance.events = events;

// alias PolymerGestures event listener logic
scope.addEventListener = PolymerGestures.addEventListener;
scope.removeEventListener = PolymerGestures.removeEventListener;
scope.addEventListener = function(node, eventType, handlerFn, capture) {
PolymerGestures.addEventListener(wrap(node), eventType, handlerFn, capture);
};
scope.removeEventListener = function(node, eventType, handlerFn, capture) {
PolymerGestures.removeEventListener(wrap(node), eventType, handlerFn, capture);
};

})(Polymer);

0 comments on commit 8d32e76

Please sign in to comment.