1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-25 11:13:52 +02:00

fix(play-toggle): call event.stopPropagation in the click handler (#5803)

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.
This commit is contained in:
Mike 2019-06-18 13:37:43 -06:00 committed by Gary Katsevman
parent 97b66a9130
commit 2c7644f91e

View File

@ -61,6 +61,7 @@ class PlayToggle extends Button {
} else {
this.player_.pause();
}
event.stopPropagation();
}
/**