Commit 01c467b4 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: max button flashing on tabbing (#3291)

parent 636abe3b
...@@ -71,7 +71,7 @@ export default function TokenInput({ ...@@ -71,7 +71,7 @@ export default function TokenInput({
const [showMax, setShowMax] = useState(false) const [showMax, setShowMax] = useState(false)
const onFocus = useCallback(() => setShowMax(Boolean(onMax)), [onMax]) const onFocus = useCallback(() => setShowMax(Boolean(onMax)), [onMax])
const onBlur = useCallback((e: FocusEvent) => { const onBlur = useCallback((e: FocusEvent) => {
if (e.relatedTarget !== max.current) { if (e.relatedTarget !== max.current && e.relatedTarget !== input.current) {
setShowMax(false) setShowMax(false)
} }
}, []) }, [])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment