[Video] Fix scrubber tap target (#5360)
* put padding on correct element * clear timeout on downzio/dev^2
parent
d62e14eca1
commit
75e3f51c10
|
@ -259,6 +259,7 @@ export function Controls({
|
||||||
if (evt.pointerType !== 'mouse' && !hovered) {
|
if (evt.pointerType !== 'mouse' && !hovered) {
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
}
|
}
|
||||||
|
clearTimeout(timeoutRef.current)
|
||||||
},
|
},
|
||||||
[hovered],
|
[hovered],
|
||||||
)
|
)
|
||||||
|
@ -355,7 +356,7 @@ export function Controls({
|
||||||
style={[
|
style={[
|
||||||
a.flex_1,
|
a.flex_1,
|
||||||
a.px_xs,
|
a.px_xs,
|
||||||
a.pt_sm,
|
a.pt_2xs,
|
||||||
a.pb_md,
|
a.pb_md,
|
||||||
a.gap_md,
|
a.gap_md,
|
||||||
a.flex_row,
|
a.flex_row,
|
||||||
|
@ -592,7 +593,7 @@ function Scrubber({
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
testID="scrubber"
|
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}
|
onPointerEnter={onStartHover}
|
||||||
onPointerLeave={onEndHover}>
|
onPointerLeave={onEndHover}>
|
||||||
<div
|
<div
|
||||||
|
@ -603,6 +604,7 @@ function Scrubber({
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
position: 'relative',
|
position: 'relative',
|
||||||
cursor: scrubberActive ? 'grabbing' : 'grab',
|
cursor: scrubberActive ? 'grabbing' : 'grab',
|
||||||
|
padding: '4px 0',
|
||||||
}}
|
}}
|
||||||
onPointerDown={onPointerDown}
|
onPointerDown={onPointerDown}
|
||||||
onPointerMove={onPointerMove}
|
onPointerMove={onPointerMove}
|
||||||
|
|
Loading…
Reference in New Issue