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

Commit

Permalink
Only prevent document touch handlers on initial setup
Browse files Browse the repository at this point in the history
Elements like core-overlay depend on document touch capturing
  • Loading branch information
dfreedm committed Aug 8, 2014
1 parent c092537 commit 725191c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/dispatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@
}
this.gestures.push(source);
},
register: function(element) {
register: function(element, initial) {
var l = this.eventSourceList.length;
for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {
// call eventsource register
es.register.call(es, element);
es.register.call(es, element, initial);
}
},
unregister: function(element) {
Expand Down
3 changes: 1 addition & 2 deletions src/platform-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,5 @@
}
}
}

dispatcher.register(document);
dispatcher.register(document, true);
})(window.PolymerGestures);
4 changes: 2 additions & 2 deletions src/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
'up',
'move'
],
register: function(target) {
if (target === document) {
register: function(target, initial) {
if (initial) {
return;
}
dispatcher.listen(target, this.events);
Expand Down

0 comments on commit 725191c

Please sign in to comment.