Skip to content

Commit

Permalink
Fix scroll after modal close
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Jan 4, 2025
1 parent 3fc1291 commit e36b987
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 e36b987

Please sign in to comment.