-
Notifications
You must be signed in to change notification settings - Fork 9
Closed
Description
Issue
Certain reasons filter the annotation selection dismissal:
text-annotator-js/packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
Lines 52 to 57 in 775f612
onOpenChange: (open, _event, reason) => { | |
if (!open && (reason === 'escape-key' || reason === 'focus-out')) { | |
setOpen(open); | |
r?.cancelSelected(); | |
} | |
}, |
So when a user on Android presses outside of the popup area - the selection doesn't get dismissed. Instead, they need to press twice. The first time the focus is placed outside of the popup, and the second time the tap is recognized as a "click" over a not-selectable area by the
SelectionHandler
.
Record_2024-10-15-13-19-32.mp4
Suggested Changes
Remove the reason
filtering and always dismiss the annotation selection when the popup is about to be closed. As the closure reason usually will be the outside-press
, focus-out
, and escape-key
.
The issue turned out to be related to the isCollapse
still being false
even though a user tapped outside of the active selection...
See - #136 (comment) & #163
Another issue is that the pointerup
/pointerdown
events handling was gated by the isContextMenu
flag. See - #167
UPD: ✅
Metadata
Metadata
Assignees
Labels
No labels