Conversation
Quote toolbar button now lifts only the cursor's paragraph out of a blockquote (splitting it so neighboring quoted lines stay quoted), instead of unwrapping the whole blockquote. Tab/Shift+Tab inside a blockquote nest deeper / lift one level. Lists and tables are checked first so their existing Tab behavior is unchanged. Normalize blockquotes that contain loose text (no block wrapper) by wrapping their contents in <p> before manipulation, and handle the case where the cursor's anchorNode is the blockquote element itself (which happens right after execCommand wraps a paragraph) by resolving to the correct child via anchorOffset. Without this, the toggle stops working after an unquote → re-quote sequence.
Selecting/clicking/editing in the md viewer caused the iframe to scroll itself to a stale line, and undo/redo plus backspace caused visible scroll jumps. Root cause was missing suppression on both sides of the sync bridge: - The iframe side: viewer-initiated events that can cause CM to scroll (selection sync, cursor-line sync, click-to-focus) didn't mark the iframe as the scroll origin, so CM's resulting scroll-handler echo came back through MDVIEWR_SCROLL_TO_LINE and re-scrolled the iframe. Centralize the flag in sendToParent for all such events, and drop the editMode-only requirement from the guard so design mode is covered too. - The CM side: cm.replaceRange (in _applyDiffToEditor), cm.scrollTo (in _scrollCMToLine), and cm.undo()/cm.redo() can each trigger an async CM scroll that echoes back to the iframe. Wrap each in _scrollSyncFromIframe = true with a 200ms clear so CM's scroll handler ignores them.
|
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.



Quote toolbar button now lifts only the cursor's paragraph out of a blockquote (splitting it so neighboring quoted lines stay quoted), instead of unwrapping the whole blockquote.
Tab/Shift+Tab inside a blockquote nest deeper / lift one level. Lists and tables are checked first so their existing Tab behavior is unchanged.
Normalize blockquotes that contain loose text (no block wrapper) by wrapping their contents in
before manipulation, and handle the case where the cursor's anchorNode is the blockquote element itself (which happens right after execCommand wraps a paragraph) by resolving to the correct child via anchorOffset. Without this, the toggle stops working after an unquote → re-quote sequence.