Skip to content

Commit

Permalink
Removed the closure filtering by a reason
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-danylchenko committed Oct 15, 2024
1 parent 775f612 commit 3840396
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => {
const { refs, floatingStyles, update, context } = useFloating({
placement: isMobile() ? 'bottom' : 'top',
open: isOpen,
onOpenChange: (open, _event, reason) => {
if (!open && (reason === 'escape-key' || reason === 'focus-out')) {
setOpen(open);
onOpenChange: (open) => {
setOpen(open);

if (!open) {
r?.cancelSelected();
}
},
Expand Down Expand Up @@ -154,4 +155,4 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => {
</FloatingPortal>
) : null;

}
}

0 comments on commit 3840396

Please sign in to comment.