Skip to content

Commit

Permalink
Merge branch 'recogito#159-simplify-popup-dismissal' into staging
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx
  • Loading branch information
oleksandr-danylchenko committed Oct 15, 2024
2 parents e59ca4f + 3840396 commit 5346d7d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ export const TextAnnotatorPopup: FC<TextAnnotationPopupProps> = (props) => {
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) {
handleClose();
}
},
Expand Down

0 comments on commit 5346d7d

Please sign in to comment.