40 Commits

Author SHA1 Message Date
Kovid Goyal
d346c19c80
E-book viewer: Fix modifying an existing highlight causing duplicates to be created in some books. Fixes #2122747 [Private bug](https://bugs.launchpad.net/calibre/+bug/2122747)
Probably the issue manifests when using box-sizing: border-box in the
book CSS, but I didnt bother to check for the exact cause.
2025-09-15 11:13:45 +05:30
un-pogaz
b0d58ade70 add 'code' dictionary to codespell setting 2025-03-23 16:02:05 +01:00
Kovid Goyal
7a50e5cb5c
... 2024-08-19 09:51:32 +05:30
Kovid Goyal
6e6ca80d62
Fix #2077283 [Private bug](https://bugs.launchpad.net/calibre/+bug/2077283) (probably) 2024-08-19 09:44:31 +05:30
Kovid Goyal
8828bc0e61
E-book viewer: Fix modifying, then jumping to and then modifying the highlight again from the highlights panel causing the highlight to be deleted. Fixes #2033981 [E-book viewer: highlights get unexpectedly deleted](https://bugs.launchpad.net/calibre/+bug/2033981) 2023-09-04 08:58:10 +05:30
Kovid Goyal
e0dee4fdef
E-book viewer: Fix searching for text next to hidden text not scrolling to the match 2023-06-18 09:18:11 +05:30
Kovid Goyal
b92d673ad4
DRYer 2023-04-20 18:09:57 +05:30
Kovid Goyal
7af8910281
E-book viewer: Fix a regression that caused notes from a different highlights to be shown in some situations. Fixes #2017130 [Private bug](https://bugs.launchpad.net/calibre/+bug/2017130) 2023-04-20 17:58:29 +05:30
Kovid Goyal
c7636ad90d
E-book viewer: Fix a regression that caused incorrect highlight collision detection in some books. Fixes #2009586 [overlaping highlight problem](https://bugs.launchpad.net/calibre/+bug/2009586) 2023-04-04 11:57:22 +05:30
Kovid Goyal
c4f3fe5745
E-book viewer: Fix some adjacent highlights with nothing in between them not being displayed. 2023-02-16 12:59:48 +05:30
Kovid Goyal
1fb7f72fd0
E-book viewer: Fix occasional false warning about highlight being overwritten. Fixes #2003916 [Overlapping highlights not detected properly (inconsistent)](https://bugs.launchpad.net/calibre/+bug/2003916)
all_annots_in_selection should return a list of unique uuids.
2023-02-02 18:07:34 +05:30
Kovid Goyal
40ca12ff39
Fix detection of selected highlights when all text is selected. See #2003908 (Clear selection when several selections are selected only deletes one) 2023-02-02 15:33:54 +05:30
Kovid Goyal
eebdd57a90
E-book viewer: Ask for confirmation when creating a highlight that will overwrite existing highlights. Fixes #1991597 [Highlights in reader, when nested, overwrite one another](https://bugs.launchpad.net/calibre/+bug/1991597) 2022-10-09 14:38:16 +05:30
Kovid Goyal
07f72d2d94
E-book viewer: Fix an error when opening some books with highlights that span inline text formatting
Fixes #1954726 [epub file no longer opens](https://bugs.launchpad.net/calibre/+bug/1954726) [epub file no longer opens](https://bugs.launchpad.net/calibre/+bug/1954726)

normalize() modifies the text nodes, and can potentially result in a
previously selected node no longer having a parent causing wrap() to
throw an exception. In any case normalizing once after all nodes have
been wrapped is faster.
2021-12-14 12:30:54 +05:30
Kovid Goyal
aabe59dd54
Fix #1922301 [Epub viewer selection error](https://bugs.launchpad.net/calibre/+bug/1922301) 2021-04-02 12:30:40 +05:30
Kovid Goyal
508936d721
DRYer 2020-12-21 11:33:06 +05:30
Kovid Goyal
47b4530a56
Viewer: Fix error when scrolling to some search results in flow mode. Fixes #1908000 [calibre viewer shows "Unhandled error: Uncaught InvalidStateError: Failed to execute 'surroundContents' on 'Range'" after RegExp searching in epub-file](https://bugs.launchpad.net/calibre/+bug/1908000) 2020-12-21 11:27:16 +05:30
Kovid Goyal
fbeb0230ff
Allow tap/click on word to skip to speaking from it 2020-12-04 07:14:33 +05:30
Kovid Goyal
c420493507
Basic marking of words during TTS playback works 2020-12-02 22:46:56 +05:30
Kovid Goyal
acd82a0bed
DRYer 2020-10-26 08:50:31 +05:30
Kovid Goyal
52cf15fc23
Fix #1895472 [Private bug](https://bugs.launchpad.net/calibre/+bug/1895472) 2020-09-14 09:04:40 +05:30
Kovid Goyal
d1a5850619
When creating range wrappers, normalize parent nodes to ensure there are no empty text nodes, as these mess up CFI calculations 2020-08-22 18:48:39 +05:30
Kovid Goyal
7db1a9d0a4
Fix notes indicator not being updated when editing notes from the highlights panels 2020-08-22 18:48:37 +05:30
Kovid Goyal
4154c3be14
Fix multiple dots for highlights with notes that have multiple internal ranges 2020-08-22 18:48:33 +05:30
Kovid Goyal
62c82232c5
Show an indicator for a highlight that has notes 2020-08-22 18:48:31 +05:30
Kovid Goyal
83490b316f
Implement scrolling keyboard shortcuts when selection bar is showing
Also remove unused code
2020-08-22 18:48:27 +05:30
Kovid Goyal
95248db34e
Make finding highlights overlapping the selection O(n) in the size of the selection rather than the number of existing highlights 2020-08-22 18:48:26 +05:30
Kovid Goyal
8fa67e7bfd
Track annot over entire selection
Also work on notes/color editor panel
2020-08-22 18:48:25 +05:30
Kovid Goyal
2078309b52
Show highlight notes in the select bar 2020-08-22 18:48:19 +05:30
Kovid Goyal
1f124726c2
Avoid error when selecting a non-existent range wrapper 2020-08-22 18:48:16 +05:30
Kovid Goyal
b37ce63c86
... 2020-08-22 18:48:13 +05:30
Kovid Goyal
05eb665be9
Ensure annotations span styles override all others 2020-08-22 18:48:13 +05:30
Kovid Goyal
14b87b8446
Add syncing of annotations along with last read position 2020-08-22 18:48:12 +05:30
Kovid Goyal
807e5f0403
Implement viewing of highlight notes by clicking on the highlight 2020-04-15 21:41:07 +05:30
Kovid Goyal
a00cde1120
Implement adding notes when creating annotations 2020-04-15 10:11:35 +05:30
Kovid Goyal
b40951e5dc
Clicking on an existing highlight should edit it 2020-04-13 16:36:58 +05:30
Kovid Goyal
a2cb25453d
Highlights are now saved and re-applied in books 2020-04-12 21:18:46 +05:30
Kovid Goyal
37a60e366a
Remove overlapping highlights when applying a new one 2020-04-11 09:40:28 +05:30
Kovid Goyal
5d9515c115
Implementation of marking selection using spans 2020-03-24 13:51:32 +05:30
Kovid Goyal
c705fc8f9a
Work on marking text ranges 2020-03-23 20:55:27 +05:30