Skip to content

Commit

Permalink
fix(play-toggle): call event.stopPropagation in the click handler (#5803
Browse files Browse the repository at this point in the history
)

The play button stops working when recent versions of Google's Polymer is in use on the page because of the way Polymer synthesizes 'tap' events on non-touch devices. The Polymer tap code thinks the click event was ignored unless the DOM event's stopPropagation method is
called.

In chrome 70 the small play/pause control doesn't work with Polymer 1.x Gestures tap is used on document. Demo of issue: https://codepen.io/mscalora/pen/mQzQmp

Fixes #5624.
  • Loading branch information
mscalora authored and gkatsev committed Jun 18, 2019
1 parent 97b66a9 commit 2c7644f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/js/control-bar/play-toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class PlayToggle extends Button {
} else {
this.player_.pause();
}
event.stopPropagation();
}

/**
Expand Down

0 comments on commit 2c7644f

Please sign in to comment.