Skip to content

Commit

Permalink
Style cm-scroller with overflow-anchor: none to prevent some buggy Ch…
Browse files Browse the repository at this point in the history
…rome scrolling

FIX: Avoid an issue where Chrome would incorrectly scroll the window when deleting lines
in the editor.

See https://discuss.codemirror.net/t/why-delete-line-makes-parent-element-scroll/8524
  • Loading branch information
marijnh committed Aug 7, 2024
1 parent 0528516 commit 71ef755
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export const baseTheme = buildTheme("." + baseThemeID, {
height: "100%",
overflowX: "auto",
position: "relative",
zIndex: 0
zIndex: 0,
overflowAnchor: "none",
},

".cm-content": {
Expand Down

0 comments on commit 71ef755

Please sign in to comment.