diff --git a/webapp/channels/src/components/new_search/search_box.tsx b/webapp/channels/src/components/new_search/search_box.tsx index 78dde9b09a4..6936a1248bb 100644 --- a/webapp/channels/src/components/new_search/search_box.tsx +++ b/webapp/channels/src/components/new_search/search_box.tsx @@ -175,7 +175,7 @@ const SearchBox = forwardRef( } setSearchTerms( - searchTerms.slice(0, caretPosition).replace(new RegExp(escapedMatchedPretext + '$', 'i'), '').trimEnd() + + searchTerms.slice(0, caretPosition).trimEnd().replace(new RegExp(escapedMatchedPretext + '$', 'i'), '').trimEnd() + val + extraSpace + searchTerms.slice(caretPosition), diff --git a/webapp/channels/src/components/new_search/search_box_input.tsx b/webapp/channels/src/components/new_search/search_box_input.tsx index d6d12c416f9..19a5b1e41f4 100644 --- a/webapp/channels/src/components/new_search/search_box_input.tsx +++ b/webapp/channels/src/components/new_search/search_box_input.tsx @@ -111,7 +111,6 @@ const SearchInput = forwardRef(({searchTerms, searchTyp value={searchTerms} onChange={inputChangeCallback} type='search' - delayInputUpdate={true} clearable={true} autoFocus={true} onKeyDown={onKeyDown}