Skip to content

Commit

Permalink
implement scroll restore
Browse files Browse the repository at this point in the history
  • Loading branch information
renardeinside committed Dec 3, 2024
1 parent 6b502aa commit 783d15a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@fontsource-variable/fira-code": "^5.1.0",
"@fontsource/space-mono": "^5.1.1",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-label": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const EditorView = ({ doc, firstLoad }: { doc: Y.Doc; firstLoad: boolean }) => {
editor={editor}
className="w-5/6 max-w-screen-xl flex-1"
/>
<div className="sticky bottom-0 h-64 w-full" onClick={() => {
<div className="h-32 w-full" onClick={() => {
// Focus the editor at the end when clicking on the empty space
editor.commands.focus("end");
}}></div>
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,11 @@
resolved "https://registry.npmjs.org/@fontsource-variable/fira-code/-/fira-code-5.1.0.tgz"
integrity sha512-fwJbJLvyZ2BhgBSPYCNsrQ6IFQTpRu9GWXY8N20wHTpbhV0Ro5QJihiZV060Ay3kVR6IVH/oSVe/cr7Ube28gg==

"@fontsource/space-mono@^5.1.1":
version "5.1.1"
resolved "https://registry.yarnpkg.com/@fontsource/space-mono/-/space-mono-5.1.1.tgz#578ca4313f669eac19a98ea0c64b926005a980fe"
integrity sha512-v72P4frEQhldHTKQv0GqOF2JRRGhMrPAIj50v88qmW1aJW1SJAvjMtFOk/3D+L+dQM0fP2A1ZVzVkDbv8JGf7A==

"@humanfs/core@^0.19.1":
version "0.19.1"
resolved "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz"
Expand Down

0 comments on commit 783d15a

Please sign in to comment.