Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#133 Fixed missing annotation dismissal clicking outside of the annotator container (vol.2) #149

Conversation

oleksandr-danylchenko
Copy link
Contributor

@oleksandr-danylchenko oleksandr-danylchenko commented Sep 3, 2024

Issue - #133

Changes Made

To capture the actual lastPointerDown event on the page and make the correct timeDifference calculations, I added pointerdown event to the document scope.

In that way, the "click" will be properly recognized in the pointerup handler and the selection will be dismissed. As there will be no annotation under the pointer.


However, we should capture the pointerdown only on the elements that are not located within thenot-annotatable tree! Otherwise, it would be possible to unexpectedly dismiss the selected annotation while a user quickly drags from the input/textarea/button, etc. onto the textual content!
More details with demo - #135 (comment)

@oleksandr-danylchenko oleksandr-danylchenko marked this pull request as ready for review September 4, 2024 10:28
@rsimon rsimon merged commit d18ff7b into recogito:main Sep 30, 2024
@oleksandr-danylchenko oleksandr-danylchenko deleted the #133-fix-not-dismissed-annotation-on-outside-click branch September 30, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants