mirror of
https://github.com/stashapp/stash.git
synced 2025-12-06 16:34:02 +01:00
Don't focus query field on select (#5204)
This commit is contained in:
parent
306ba63ab6
commit
a8a3b4cfd9
1 changed files with 5 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ import { CriterionModifier } from "src/core/generated-graphql";
|
|||
import { keyboardClickHandler } from "src/utils/keyboard";
|
||||
import { useDebounce } from "src/hooks/debounce";
|
||||
import useFocus from "src/utils/focus";
|
||||
import ScreenUtils from "src/utils/screen";
|
||||
|
||||
interface ISelectedItem {
|
||||
item: ILabeledId;
|
||||
|
|
@ -235,8 +236,11 @@ export const ObjectsFilter = <
|
|||
setDisplayQuery("");
|
||||
|
||||
// focus the input box
|
||||
// don't do this on touch devices, as it's annoying
|
||||
if (!ScreenUtils.isTouch()) {
|
||||
setInputFocus();
|
||||
}
|
||||
}
|
||||
|
||||
const onUnselect = useCallback(
|
||||
(value: ILabeledId) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue