Skip to content

Commit 783d15a

Browse files
committed
implement scroll restore
1 parent 6b502aa commit 783d15a

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
},
1717
"dependencies": {
1818
"@fontsource-variable/fira-code": "^5.1.0",
19+
"@fontsource/space-mono": "^5.1.1",
1920
"@radix-ui/react-dialog": "^1.1.2",
2021
"@radix-ui/react-dropdown-menu": "^2.1.2",
2122
"@radix-ui/react-label": "^2.1.0",

src/components/Editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const EditorView = ({ doc, firstLoad }: { doc: Y.Doc; firstLoad: boolean }) => {
4545
editor={editor}
4646
className="w-5/6 max-w-screen-xl flex-1"
4747
/>
48-
<div className="sticky bottom-0 h-64 w-full" onClick={() => {
48+
<div className="h-32 w-full" onClick={() => {
4949
// Focus the editor at the end when clicking on the empty space
5050
editor.commands.focus("end");
5151
}}></div>

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,11 @@
373373
resolved "https://registry.npmjs.org/@fontsource-variable/fira-code/-/fira-code-5.1.0.tgz"
374374
integrity sha512-fwJbJLvyZ2BhgBSPYCNsrQ6IFQTpRu9GWXY8N20wHTpbhV0Ro5QJihiZV060Ay3kVR6IVH/oSVe/cr7Ube28gg==
375375

376+
"@fontsource/space-mono@^5.1.1":
377+
version "5.1.1"
378+
resolved "https://registry.yarnpkg.com/@fontsource/space-mono/-/space-mono-5.1.1.tgz#578ca4313f669eac19a98ea0c64b926005a980fe"
379+
integrity sha512-v72P4frEQhldHTKQv0GqOF2JRRGhMrPAIj50v88qmW1aJW1SJAvjMtFOk/3D+L+dQM0fP2A1ZVzVkDbv8JGf7A==
380+
376381
"@humanfs/core@^0.19.1":
377382
version "0.19.1"
378383
resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz"

0 commit comments

Comments
 (0)