Skip to content

Commit

Permalink
Fix incorrect character bounds given to edit context
Browse files Browse the repository at this point in the history
FIX: Fix an issue causing the IME interface to appear in the wrong spot on
Chrome Windows.

Closes codemirror/dev#1396
  • Loading branch information
marijnh committed Jul 1, 2024
1 parent 43efb20 commit f63ca4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/domobserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ class EditContextManager {
let rects: DOMRect[] = [], prev: DOMRect | null = null
for (let i = this.toEditorPos(e.rangeStart), end = this.toEditorPos(e.rangeEnd); i < end; i++) {
let rect = view.coordsForChar(i)
prev = (rect && new DOMRect(rect.left, rect.right, rect.right - rect.left, rect.bottom - rect.top))
prev = (rect && new DOMRect(rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top))
|| prev || new DOMRect
rects.push(prev)
}
Expand Down

0 comments on commit f63ca4e

Please sign in to comment.