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

Commit a475887

Browse files
authored
Merge pull request #4891 from matrix-org/t3chguy/room-list/111
Fix theme selector clicks bubbling out and causing context menu to float away
2 parents 120e782 + 3f62f20 commit a475887

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/structures/UserMenu.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@ export default class UserMenu extends React.Component<IProps, IState> {
130130
this.setState({contextMenuPosition: null});
131131
};
132132

133-
private onSwitchThemeClick = () => {
133+
private onSwitchThemeClick = (ev: React.MouseEvent) => {
134+
ev.preventDefault();
135+
ev.stopPropagation();
136+
134137
// Disable system theme matching if the user hits this button
135138
SettingsStore.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
136139

0 commit comments

Comments
 (0)