parent
e38f9a293b
commit
62a10e6587
|
@ -177,6 +177,10 @@ function GifsMenu() {
|
||||||
// This fixes that.
|
// This fixes that.
|
||||||
useEffect(() => setSearchKey(''), []);
|
useEffect(() => setSearchKey(''), []);
|
||||||
|
|
||||||
|
const onInputKeyPress = useCallback((e: React.KeyboardEvent) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
}, []);
|
||||||
|
|
||||||
const gifMenu = (
|
const gifMenu = (
|
||||||
<div
|
<div
|
||||||
className = { cx(styles.gifsMenu,
|
className = { cx(styles.gifsMenu,
|
||||||
|
@ -186,6 +190,7 @@ function GifsMenu() {
|
||||||
autoFocus = { true }
|
autoFocus = { true }
|
||||||
className = { cx(styles.searchField, 'gif-input') }
|
className = { cx(styles.searchField, 'gif-input') }
|
||||||
onChange = { handleSearchKeyChange }
|
onChange = { handleSearchKeyChange }
|
||||||
|
onKeyPress = { onInputKeyPress }
|
||||||
placeholder = { t('giphy.search') }
|
placeholder = { t('giphy.search') }
|
||||||
// eslint-disable-next-line react/jsx-no-bind
|
// eslint-disable-next-line react/jsx-no-bind
|
||||||
ref = { inputElement => {
|
ref = { inputElement => {
|
||||||
|
|
Loading…
Reference in New Issue