Skip to content

Commit

Permalink
fix: max button flashing on tabbing (#3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzmp authored Feb 11, 2022
1 parent 636abe3 commit 01c467b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/components/Swap/TokenInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function TokenInput({
const [showMax, setShowMax] = useState(false)
const onFocus = useCallback(() => setShowMax(Boolean(onMax)), [onMax])
const onBlur = useCallback((e: FocusEvent) => {
if (e.relatedTarget !== max.current) {
if (e.relatedTarget !== max.current && e.relatedTarget !== input.current) {
setShowMax(false)
}
}, [])
Expand Down

0 comments on commit 01c467b

Please sign in to comment.