Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix seekbar in voice broadcast pip #9634

Merged
merged 1 commit into from
Nov 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/views/audio_messages/SeekBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ export default class SeekBar extends React.PureComponent<IProps, IState> {
this.props.playback.skipTo(Number(ev.target.value) * this.props.playback.durationSeconds);
};

private onMouseDown = (event: React.MouseEvent<Element, 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.
Expand All @@ -101,6 +106,7 @@ export default class SeekBar extends React.PureComponent<IProps, IState> {
className='mx_SeekBar'
tabIndex={this.props.tabIndex}
onChange={this.onChange}
onMouseDown={this.onMouseDown}
min={0}
max={1}
value={this.state.percentage}
Expand Down