From defbe16448481a44183aec225a50cf51e4b277bd Mon Sep 17 00:00:00 2001 From: Ingrid <36052282+twigleingrid@users.noreply.github.com> Date: Wed, 22 Dec 2021 17:16:51 +0100 Subject: [PATCH] Trim spurious whitespace of "Explore rooms" menu input (#7431) * Trim spurious whitespace of "Explore rooms" menu input Trims the whitespace around the input string in order to show relevant room suggestions and the "Join" button. Fixes https://github.com/vector-im/element-web/issues/19728 Signed-off by: Ingrid Budau inigiri@posteo.jp * Add safe navigation Co-authored-by: Travis Ralston Co-authored-by: Travis Ralston --- src/components/structures/RoomDirectory.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/RoomDirectory.tsx b/src/components/structures/RoomDirectory.tsx index a60ee5f805..9b6c068cda 100644 --- a/src/components/structures/RoomDirectory.tsx +++ b/src/components/structures/RoomDirectory.tsx @@ -393,7 +393,7 @@ export default class RoomDirectory extends React.Component { private onFilterChange = (alias: string) => { this.setState({ - filterString: alias || "", + filterString: alias?.trim() || "", }); // don't send the request for a little bit,