edrlab / thorium-reader

A cross platform desktop reading app, based on the Readium Desktop toolkit
https://www.edrlab.org/software/thorium-reader/
BSD 3-Clause "New" or "Revised" License
1.68k stars 148 forks source link

annotations: Thorium says "no selection" but there is one #2162

Closed danielweck closed 2 months ago

danielweck commented 2 months ago

To reproduce: 1) select text with mouse cursor 2) click on the annotations icon in the top toolbar => the popout editor is displayed 3) press escape (cancel / close the popout) 4) click on the icon again ... Thorium says "no selection" yet it is still here, unchanged

Screenshot 2024-05-10 at 18 41 16
danielweck commented 2 months ago

PS: note the poor contrast ratio between selection and foreground colours ... this will be fixed by https://github.com/edrlab/thorium-reader/pull/2106

panaC commented 2 months ago

culprit : https://github.com/edrlab/thorium-reader/blob/97cd820bce2bef818c735021d2175508a5de4f24/src/renderer/reader/redux/sagas/annotation.ts#L127 need to re-loop on https://github.com/edrlab/thorium-reader/blob/97cd820bce2bef818c735021d2175508a5de4f24/src/renderer/reader/redux/sagas/annotation.ts#L183-L183