Skip to content

Commit 14b5d55

Browse files
committed
fix: on air button could disappear permanently when scrolling just after the on air button is clicked
1 parent 9eb142b commit 14b5d55

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

packages/webui/src/client/ui/RundownView/RundownRightHandControls.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export function RundownRightHandControls(props: Readonly<IProps>): JSX.Element {
8686
} = props
8787

8888
useEffect(() => {
89+
console.log('onAirHover - props.isFollowingOnAir state', props.isFollowingOnAir)
8990
if (onAirHover && props.isFollowingOnAir) {
9091
setOnAirHover(false)
9192
}
@@ -168,19 +169,21 @@ export function RundownRightHandControls(props: Readonly<IProps>): JSX.Element {
168169
>
169170
<RewindAllSegmentsIcon />
170171
</button>
171-
{!props.isFollowingOnAir && (
172-
<button
173-
className="status-bar__controls__button"
174-
role="button"
175-
onMouseEnter={onOnAirMouseEnter}
176-
onMouseLeave={onOnAirMouseLeave}
177-
onClick={onOnAirClick}
178-
tabIndex={0}
179-
aria-label={t('Go to On Air Segment')}
180-
>
181-
{onAirHover ? <Lottie config={ONAIR_OVER} /> : <Lottie config={ONAIR_OUT} />}
182-
</button>
183-
)}
172+
<div>
173+
{!props.isFollowingOnAir && (
174+
<button
175+
className="status-bar__controls__button"
176+
role="button"
177+
onMouseEnter={onOnAirMouseEnter}
178+
onMouseLeave={onOnAirMouseLeave}
179+
onClick={onOnAirClick}
180+
tabIndex={0}
181+
aria-label={t('Go to On Air Segment')}
182+
>
183+
{onAirHover ? <Lottie config={ONAIR_OVER} /> : <Lottie config={ONAIR_OUT} />}
184+
</button>
185+
)}
186+
</div>
184187
</VelocityReact.VelocityTransitionGroup>
185188
<VelocityReact.VelocityTransitionGroup
186189
enter={{ animation: 'fadeIn', easing: 'ease-out', duration: 250 }}

0 commit comments

Comments
 (0)