Skip to content

Commit 22f4595

Browse files
authored
Fix scroll to last scroll position after close modal search (#4057)
1 parent f288a83 commit 22f4595

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beta/src/components/Search.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const options = {
4242
appId: siteConfig.algolia.appId,
4343
apiKey: siteConfig.algolia.apiKey,
4444
indexName: siteConfig.algolia.indexName,
45-
rednerModal: true,
4645
};
4746
let DocSearchModal: any = null;
4847
export const Search: React.FC<SearchProps> = ({
@@ -120,6 +119,7 @@ export const Search: React.FC<SearchProps> = ({
120119
createPortal(
121120
<DocSearchModal
122121
{...options}
122+
initialScrollY={window.scrollY}
123123
searchParameters={searchParameters}
124124
onClose={onClose}
125125
navigator={{

0 commit comments

Comments
 (0)