Skip to content

Incorrect caret positioning when zoomed in specific library #52

@Saul-Mirone

Description

@Saul-Mirone

Originally reported in Milkdown/milkdown#2121

Link to runnable example

https://stackblitz.com/edit/csz9rfwk-d4u8wmme?file=src%2FApp.svelte

Steps to reproduce

  1. go to the stackblitz link
  2. refresh preview if nothing appears
  3. zoom / dezoom in the preview
  4. click on the "Hello Milkdown"
  5. caret is not where i click

Should be how the zoom is handled by the reactflow / svelteflow library. Works for other editors so something should be doable.

Expected behavior

Caret should be where i click at any zoom level

Actual behavior

caret position is incorrect although when clicking and typing the position is correct.

Seems the library add a top level transform: scale css on its canvas....

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions