From 1095dc4dc6d82a1d72d87533c267bd35284f03ff Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 9 May 2021 12:28:45 +0530 Subject: [PATCH] E-book viewer: Fix right or shift-clicking to extend selection not shrinking selection when the click is inside the selection. Fixes #1926793 [E-book viewer: right-clicking inside the selection does nothing](https://bugs.launchpad.net/calibre/+bug/1926793) --- src/pyj/select.pyj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pyj/select.pyj b/src/pyj/select.pyj index 37352870dc..1997b137ab 100644 --- a/src/pyj/select.pyj +++ b/src/pyj/select.pyj @@ -206,7 +206,8 @@ def move_end_of_selection(pos, start): elif r.compareBoundaryPoints(window.Range.END_TO_END, q) <= 0: start = False else: - return + # point is inside the selection + start = False if start: if r.startContainer is not p.offsetNode or r.startOffset is not p.offset: r.setStart(p.offsetNode, p.offset)