From 2852e29c73ccfe86e81f63258a843cc614b9e62e Mon Sep 17 00:00:00 2001 From: mehekj Date: Tue, 21 Jun 2022 14:01:33 -0400 Subject: fixed scrubbing in full screen or after dragging slider --- src/client/views/nodes/VideoBox.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 43f052859..4c6680dcf 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -163,7 +163,8 @@ export class VideoBox extends ViewBoxAnnotatableComponent { if ( - !(e.target instanceof HTMLInputElement) && + // need to include range inputs because after dragging time slider it becomes target element + !(e.target instanceof HTMLInputElement && !(e.target.type === "range")) && this.props.isSelected(true) ) { switch (e.key) { @@ -283,10 +284,11 @@ export class VideoBox extends ViewBoxAnnotatableComponent { e.stopPropagation(); - clearTimeout(this._controlsFadeTimer); - this._controlsVisible = true; - this._scrubbing = false; - this._controlsFadeTimer = setTimeout(action(() => this._controlsVisible = false), 3000); + if (!this._scrubbing) { + clearTimeout(this._controlsFadeTimer); + this._controlsVisible = true; + this._controlsFadeTimer = setTimeout(action(() => this._controlsVisible = false), 3000); + } } -- cgit v1.2.3-70-g09d2