Skip to content

Commit

Permalink
[Video] Fix scrubber tap target (#5360)
Browse files Browse the repository at this point in the history
* put padding on correct element

* clear timeout on down

(cherry picked from commit 75e3f51)
  • Loading branch information
mozzius authored and haileyok committed Sep 16, 2024
1 parent 3dd4d30 commit 07bea48
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ export function Controls({
if (evt.pointerType !== 'mouse' && !hovered) {
evt.preventDefault()
}
clearTimeout(timeoutRef.current)
},
[hovered],
)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -603,6 +604,7 @@ function Scrubber({
alignItems: 'center',
position: 'relative',
cursor: scrubberActive ? 'grabbing' : 'grab',
padding: '4px 0',
}}
onPointerDown={onPointerDown}
onPointerMove={onPointerMove}
Expand Down

0 comments on commit 07bea48

Please sign in to comment.