From 34175babb28fbb26d94369152b0ead7d955ca3e7 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Sat, 4 Jan 2025 22:32:45 +0100 Subject: [PATCH] Fix scroll after modal close (#1798) --- components/modal.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/modal.js b/components/modal.js index f01ca8a1c..f5039ebc7 100644 --- a/components/modal.js +++ b/components/modal.js @@ -109,6 +109,7 @@ export default function useModal () { const showModal = useCallback( (getContent, options) => { + document.activeElement?.blur() const ref = { node: getContent(onClose, setOptions), options } if (options?.replaceModal) { modalStack.current = [ref]