{{ message }}
Repository navigation
fix(muya): show the text cursor over the whole editable column (#5477) - #5478
Merged
Merged
Conversation
Only headings turned the pointer into an I-beam; paragraphs, code blocks, quotes, lists and tables kept the arrow. #2850 stated the affordance in two halves: `cursor: default` on marktext's scrolling mount (`.editor-component`) so the margins around the column read as chrome, and `cursor: text` on the text column itself (`#ag-editor-id`). The muya rewrite carried over the first half but not the second, so the inherited `default` reached every block — and `.mu-container h1..h6`, which states `cursor: text` of its own, was the only survivor. Put the declaration back where it belongs, on `.mu-container`, and drop the heading rule that is now redundant. Links, task checkboxes and the other click targets state `cursor: pointer` themselves, so they are unaffected. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #5477.
Problem
Hovering the editor only turned the pointer into an I-beam over headings. Paragraphs, code blocks, blockquotes, lists and tables all kept the plain arrow.
Root cause
#2850 stated the affordance in two halves:
cursor: defaulton marktext's scrolling mount (.editor-component), so the margins around the text column read as chrome;cursor: texton the text column itself — back then#ag-editor-idinsrc/muya/themes/default.css.The muya rewrite carried the first half over (it still sits in
editor.vue) but not the second:.mu-container, the new engine's text column and the direct analogue of#ag-editor-id, never got the rule.cursorinherits, so the mount'sdefaultreached every block, and.mu-container h1..h6— which states acursor: textof its own — was the lone survivor. That is exactly the reported symptom.Verified in the packaged app before the fix:
Fix
Put the missing declaration back on
.mu-containerand drop the heading rule, which is now redundant. Click targets inside the column (links, task checkboxes, the code-copy and copy-anchor buttons, image tools) all statecursor: pointerthemselves, so they are unaffected — the added test pins that too..editor-componentkeeps its arrow, so the gutters either side of the column still read as chrome, as #2850 intended.Export output is untouched: exported HTML/PDF is styled by
exportStyle.css, notblockSyntax.css.Test
packages/desktop/test/e2e/issue-5477-editor-text-cursor.spec.tsopens a document with a heading, paragraph, fenced code block, blockquote, task list and table, and asserts for each block both the computedcursorand the cursor of whateverelementFromPointhits at its centre — the element the pointer actually resolves against. It fails ondevelop(.mu-container p: expectedtext, receiveddefault) and passes with this change.🤖 Generated with Claude Code