Fix scroll after modal close (#1798)

This commit is contained in:
ekzyis 2025-01-04 22:32:45 +01:00 committed by GitHub
parent 3fc1291600
commit 34175babb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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]