diff options
author | ydylla <ydylla@gmail.com> | 2020-02-08 18:59:09 +0100 |
---|---|---|
committer | ydylla <ydylla@gmail.com> | 2020-02-08 19:14:06 +0100 |
commit | 9075ea189a013f7c9ddc0a473d7efbd96ac557f8 (patch) | |
tree | 86f2dc778909fa77699a1ac553cd3cfb71705d6d /src/js/plugins/preview-thumbnails.js | |
parent | 8b9521d5a5d34bf81c57e901286ac325da2c1fc0 (diff) | |
download | plyr-9075ea189a013f7c9ddc0a473d7efbd96ac557f8.tar.lz plyr-9075ea189a013f7c9ddc0a473d7efbd96ac557f8.tar.xz plyr-9075ea189a013f7c9ddc0a473d7efbd96ac557f8.zip |
fix scrubbing for chrome android & hide thumb preview on touchend
Chrome android sends TouchEvent which does not have a button property.
Diffstat (limited to 'src/js/plugins/preview-thumbnails.js')
-rw-r--r-- | src/js/plugins/preview-thumbnails.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/plugins/preview-thumbnails.js b/src/js/plugins/preview-thumbnails.js index 44e6ace7..6cd09ef2 100644 --- a/src/js/plugins/preview-thumbnails.js +++ b/src/js/plugins/preview-thumbnails.js @@ -239,8 +239,8 @@ class PreviewThumbnails { } startScrubbing(event) { - // Only act on left mouse button (0), or touch device (event.button is false) - if (event.button === false || event.button === 0) { + // Only act on left mouse button (0), or touch device (event.button does not exist or is false) + if (is.nullOrUndefined(event.button) || event.button === false || event.button === 0) { this.mouseDown = true; // Wait until media has a duration |