Skip to content

Commit

Permalink
Fix scroll after modal close (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis authored Jan 4, 2025
1 parent 3fc1291 commit 34175ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 34175ba

Please sign in to comment.