This commit is contained in:
Kovid Goyal 2024-02-29 14:02:19 +05:30
parent b10eebf7a0
commit 544d34fa42
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -238,5 +238,7 @@ def move_end_of_selection(pos, start):
new_range.setEnd(p.offsetNode, p.offset)
other_boundary_changed = r.startContainer is not new_range.startContainer or r.startOffset is not new_range.startOffset
if not new_range.collapsed or not other_boundary_changed:
# we ignore the case when the new range is collapsed and the other end
# of the selection is also moved as this is a chromium bug. See https://bugs.launchpad.net/bugs/2054934
sel.removeAllRanges()
sel.addRange(new_range)