Port upstream linked image modifier click fix#73
Open
Renakoni wants to merge 1 commit into
Open
Conversation
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.
Upstream
Ports marktext/marktext#4858: marktext/marktext#4858
This is stacked on #69 (
sync/upstream-4861-prism-dependency-order) because the focused Muya tests boot the editor and Android main still has the pre-#4861 Prism dynamic import issue under Vitest.Android relevance
Android carries the same Muya link and image click handlers. Modifier-click is primarily desktop-style, but Android devices can use hardware keyboards, mice, tablets, and Chromebooks; keeping Muya's event contract aligned also prevents the image preview handler from racing the link handler for linked images.
Changes
LINK_SELECTORso image selection can reuse the same definition of link wrappers.format-clickemission when a modifier-clicked image is inside a link wrapper.Verification
pnpm --dir third_party/muya exec vitest run src/selection/__tests__/linkedImageClick.spec.ts src/selection/__tests__/duplicateImageResize.spec.ts src/selection/__tests__/parityPreviewImage.spec.ts src/__tests__/formatClickEvents.spec.tspnpm build