recogito / recogito-js

A JavaScript library for text annotation
BSD 3-Clause "New" or "Revised" License
349 stars 38 forks source link

Highlighting collapses completely #75

Closed kdaniel21 closed 1 year ago

kdaniel21 commented 1 year ago

Hi!

While testing the library in the playground, we've found a bug with @st3h3n. The highlighting collapses completely if an already annotated piece of text is selected in a way that both at the beginning, and the end the text cursor is visible. First, the exception is raised, an then Recogito does not seem to be able to recover from that. Peek 2022-07-14 17-34

rsimon commented 1 year ago

Thanks for reporting. I think I've actually seen that before, and it doesn't specifically happen for the annotations only, but for particular edge cases in the markup which (I think) involve tag boundaries and spaces or something. I never was able to thoroughly reproduce it with test documents. But it looks like you finally nailed down a reproducible way to trigger the issue. I'll look into it.

rsimon commented 1 year ago

Weird - I tried this now (FF and Chrome) and, just like issue #76, I couldn't reproduce. Can you post which RecogitoJS version you are using, and on what browser and OS you are seeing the bug?

kdaniel21 commented 1 year ago

This is the publicly available, tested in Firefox Developer Edition version 103.0b9 (64-bit), under Kubuntu 22.04. Besides, @st3h3n used the latest (?) version of Edge under Windows 11 to reproduce it, so I'd assume that it is not specific to my machine.

As in the other GitHub issue, could you please post a GIF of you attempting to reproduce the issue? It might help us nail down where exactly your way of reproducing deviates from ours.

rsimon commented 1 year ago

Ah - well, no, the public demo is hopelessly outdated. You can grab the latest version off the CDN here: https://cdn.jsdelivr.net/npm/@recogito/recogito-js@1.7.1/dist/recogito.min.js https://cdn.jsdelivr.net/npm/@recogito/recogito-js@1.7.1/dist/recogito.min.css

Sorry for this! (I wish there was more time to maintain this thing... especially docs ;-)

kdaniel21 commented 1 year ago

Similarly to #76, I couldn't reproduce this issue either in a different environment using the newest Recogito. I'll close this one as well, and we'll keep an eye on the potential bug. A big thank you from here again! ;)