recogito / recogito-js

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

Dropdown closes even if the input has content #79

Closed kdaniel21 closed 1 year ago

kdaniel21 commented 1 year ago

Hi! We're wondering whether there is any way to prevent the dropdown from closing when it the input already has content. The issue is that the user's input is lost then, and it's pretty easy to click outside even by accident. Peek 2022-08-18 16-28

(In spite of the reproduction using the outdated public demo, the issue is still present in the newest version.) @st3h3n

rsimon commented 1 year ago

Hi, unfortunately that's the behavior right now. To be honest, I'm in full agreement with you that only the Cancel button should cancel the popup. Closing on click outside feels ok for read-only annotations, but it's not great behavior when editing.

I'm also linking to the same issue on the Annotorious issue tracker here: https://github.com/recogito/annotorious/issues/228

rsimon commented 1 year ago

FWIW: changing the behavior is probably not a big change. I wasn't able to work on Annotorious/RecogitoJS as much as I would have liked recently, unfortunately. But this could be put on the list for the next release.

rsimon commented 1 year ago

Moving this to the RecogitoJS repo