From e71a757f908c04e92f4922db62abe9ca56605ad6 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Mon, 28 Nov 2022 16:29:43 +0100 Subject: [PATCH] Fix seekbar in voice broadcast recording pip (#9634) --- src/components/views/audio_messages/SeekBar.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/views/audio_messages/SeekBar.tsx b/src/components/views/audio_messages/SeekBar.tsx index 5e2d90e906..c5a6017c64 100644 --- a/src/components/views/audio_messages/SeekBar.tsx +++ b/src/components/views/audio_messages/SeekBar.tsx @@ -93,6 +93,11 @@ export default class SeekBar extends React.PureComponent { this.props.playback.skipTo(Number(ev.target.value) * this.props.playback.durationSeconds); }; + private onMouseDown = (event: React.MouseEvent) => { + // do not propagate mouse down events, because these should be handled by the seekbar + event.stopPropagation(); + }; + public render(): ReactNode { // We use a range input to avoid having to re-invent accessibility handling on // a custom set of divs. @@ -101,6 +106,7 @@ export default class SeekBar extends React.PureComponent { className='mx_SeekBar' tabIndex={this.props.tabIndex} onChange={this.onChange} + onMouseDown={this.onMouseDown} min={0} max={1} value={this.state.percentage}