recogito / text-annotator-js

A JavaScript library for text annotation.
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

#136 Fixed missing annotation dismissal clicking over native selection range #137

Closed oleksandr-danylchenko closed 2 months ago

oleksandr-danylchenko commented 3 months ago

Issue - https://github.com/recogito/text-annotator-js/issues/136

Changes Made

Added timeout before reading the document.getSelection().isCollapsed, making it more consistent, and eliminating the difference between clicking over the native selection range and beyond it. See more details here.

Demo

https://github.com/user-attachments/assets/5f49da4e-341d-4811-902c-91cdeb479168