fix(common): correct coordinates calculation for selection end position (#4826)

This commit is contained in:
Anwarul Islam 2025-03-13 14:26:04 +06:00 committed by GitHub
parent a0f424799c
commit f63474cd06
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -279,7 +279,7 @@ export function useCodemirror(
}
const text = view.value?.state.doc.sliceString(from, to)
const coords = view.value?.coordsAtPos(from)
const coords = view.value?.coordsAtPos(to)
const top = coords?.top ?? 0
const left = coords?.left ?? 0
if (text?.trim()) {