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

Commit 1f0781c

Browse files
authored
[Release] Inhibit Room List keyboard pass-thru when the search beta is enabled (#7754)
1 parent eb72199 commit 1f0781c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/components/structures/LeftPanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
317317

318318
private onRoomListKeydown = (ev: React.KeyboardEvent) => {
319319
if (ev.altKey || ev.ctrlKey || ev.metaKey) return;
320+
if (SettingsStore.getValue("feature_spotlight")) return;
320321
// we cannot handle Space as that is an activation key for all focusable elements in this widget
321322
if (ev.key.length === 1) {
322323
ev.preventDefault();

src/components/structures/RoomSearch.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ export default class RoomSearch extends React.PureComponent<IProps, IState> {
9696
private onSpotlightChange = () => {
9797
const spotlightBetaEnabled = SettingsStore.getValue("feature_spotlight");
9898
if (this.state.spotlightBetaEnabled !== spotlightBetaEnabled) {
99-
this.setState({ spotlightBetaEnabled });
99+
this.setState({
100+
spotlightBetaEnabled,
101+
query: "",
102+
});
100103
}
101104
// in case the user was in settings at the 5-minute mark, dismiss the toast
102105
ToastStore.sharedInstance().dismissToast("BETA_SPOTLIGHT_TOAST");

0 commit comments

Comments
 (0)