From 75e3f51c10ab52c6e14eecf837a2336b30c3402d Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Mon, 16 Sep 2024 18:15:07 +0100
Subject: [Video] Fix scrubber tap target (#5360)

* put padding on correct element

* clear timeout on down
---
 src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx')

diff --git a/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx b/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx
index 791025f70..97c52a0db 100644
--- a/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx
+++ b/src/view/com/util/post-embeds/VideoEmbedInner/VideoWebControls.tsx
@@ -259,6 +259,7 @@ export function Controls({
       if (evt.pointerType !== 'mouse' && !hovered) {
         evt.preventDefault()
       }
+      clearTimeout(timeoutRef.current)
     },
     [hovered],
   )
@@ -355,7 +356,7 @@ export function Controls({
           style={[
             a.flex_1,
             a.px_xs,
-            a.pt_sm,
+            a.pt_2xs,
             a.pb_md,
             a.gap_md,
             a.flex_row,
@@ -592,7 +593,7 @@ function Scrubber({
   return (
     <View
       testID="scrubber"
-      style={[{height: 18, width: '100%'}, a.flex_shrink_0, a.px_xs, a.py_xs]}
+      style={[{height: 18, width: '100%'}, a.flex_shrink_0, a.px_xs]}
       onPointerEnter={onStartHover}
       onPointerLeave={onEndHover}>
       <div
@@ -603,6 +604,7 @@ function Scrubber({
           alignItems: 'center',
           position: 'relative',
           cursor: scrubberActive ? 'grabbing' : 'grab',
+          padding: '4px 0',
         }}
         onPointerDown={onPointerDown}
         onPointerMove={onPointerMove}
-- 
cgit 1.4.1

