Skip to content

fix: split view / raw markdown editor can't scroll in fullscreen (#1088) - #1228

Open
cycsmail wants to merge 1 commit into
blinkospace:mainfrom
cycsmail:fix-markdown-fullscreen-scroll-1088
Open

fix: split view / raw markdown editor can't scroll in fullscreen (#1088)#1228
cycsmail wants to merge 1 commit into
blinkospace:mainfrom
cycsmail:fix-markdown-fullscreen-scroll-1088

Conversation

@cycsmail

@cycsmail cycsmail commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #1088.

In fullscreen editing the split-view and raw-markdown panes can't be scrolled, while IR and WYSIWYG work fine. The reason is that sv/raw render as a single <pre class="vditor-sv vditor-reset"> where the container and the editable surface are the same element, so the existing rule

.vditor.fullscreen-editor .vditor-sv .vditor-reset { overflow-y: auto; }

never matches it (it's a descendant selector, but here .vditor-reset sits on the same element as .vditor-sv). The element is left with overflow: hidden from the group above, so it clips instead of scrolling. IR/WYSIWYG nest a separate .vditor-reset inside their container, which is why they were unaffected.

The fix adds a compound selector targeting that combined element so it scrolls itself:

.vditor.fullscreen-editor .vditor-sv.vditor-reset {
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
}

Higher specificity than the overflow: hidden group, so the sv/raw pane resolves to overflow-y: auto. Non-fullscreen editing and IR/WYSIWYG are untouched.

The repo has no CSS/DOM test harness, so I checked this with a small standalone cascade resolver that parses vditor.css and computes the effective overflow-y for the fullscreen pre.vditor-sv.vditor-reset: with the fix it resolves to auto, and after stripping the added rule it goes back to hidden, confirming the checker tracks the actual bug and not just my edit.

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

原始markdown页面无法滑动 || The original markdown page cannot be slid

1 participant