mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
Fix for Chrome 71 touch events bug (#397)
* Fix for Chrome 71 touch events bug Fixes #389, #396, #395, #394 (duplicates) Also fixes #213 video control panel disappears sometimes after click which was caused by double clicking was canceling. this issue was most commented issue. * Update inject.js
This commit is contained in:

committed by
Ilya Grigorik

parent
86ccce0a86
commit
8547a95a16
@@ -98,17 +98,9 @@ chrome.runtime.sendMessage({}, function(response) {
|
|||||||
top = Math.max(this.video.offsetTop, 0) + "px",
|
top = Math.max(this.video.offsetTop, 0) + "px",
|
||||||
left = Math.max(this.video.offsetLeft, 0) + "px";
|
left = Math.max(this.video.offsetLeft, 0) + "px";
|
||||||
|
|
||||||
var prevent = function(e) {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
|
||||||
|
|
||||||
var wrapper = document.createElement('div');
|
var wrapper = document.createElement('div');
|
||||||
wrapper.classList.add('vsc-controller');
|
wrapper.classList.add('vsc-controller');
|
||||||
wrapper.dataset['vscid'] = this.id;
|
wrapper.dataset['vscid'] = this.id;
|
||||||
wrapper.addEventListener('dblclick', prevent, true);
|
|
||||||
wrapper.addEventListener('mousedown', prevent, true);
|
|
||||||
wrapper.addEventListener('click', prevent, true);
|
|
||||||
|
|
||||||
if (tc.settings.startHidden) {
|
if (tc.settings.startHidden) {
|
||||||
wrapper.classList.add('vsc-hidden');
|
wrapper.classList.add('vsc-hidden');
|
||||||
|
Reference in New Issue
Block a user