Skip to content

[Bug] Incorrect caret positioning when zoomed in specific library #2121

@printfhere

Description

@printfhere

Initial checklist

  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything (or linked relevant results below)

Affected packages and versions

latest

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

Problem is not for all zoom as I can't reproduce on the Milkdown playground.
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.

Runtime

No response

OS

No response

Build and bundle tools

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions