Skip to content

Commit 34175ba

Browse files
authored
Fix scroll after modal close (#1798)
1 parent 3fc1291 commit 34175ba

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

components/modal.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export default function useModal () {
109109

110110
const showModal = useCallback(
111111
(getContent, options) => {
112+
document.activeElement?.blur()
112113
const ref = { node: getContent(onClose, setOptions), options }
113114
if (options?.replaceModal) {
114115
modalStack.current = [ref]

0 commit comments

Comments
 (0)