From e973da3f61a424d1d3b62cb400a41da2a0f4097e Mon Sep 17 00:00:00 2001 From: zhcode Date: Sat, 12 Aug 2023 21:27:12 +0800 Subject: [PATCH] Fix that the search box does not work to the Enter key on the soft keyboard of the mobile phone --- client/src/components/SearchBar/SearchBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/SearchBar/SearchBar.tsx b/client/src/components/SearchBar/SearchBar.tsx index f0b78a5..11d6b8b 100644 --- a/client/src/components/SearchBar/SearchBar.tsx +++ b/client/src/components/SearchBar/SearchBar.tsx @@ -78,7 +78,7 @@ export const SearchBar = (props: Props): JSX.Element => { setLocalSearch(encodedURL); } - if (e.code === 'Enter' || e.code === 'NumpadEnter') { + if (e.code === 'Enter' || e.code === 'NumpadEnter' || e.keyCode === 13) { if (!primarySearch.prefix) { // Prefix not found -> emit notification createNotification({