Skip to content

Commit

Permalink
Merge branch 'recogito#172-fix-popup-flickering-selection' into staging
Browse files Browse the repository at this point in the history
# Conflicts:
#	packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx
  • Loading branch information
oleksandr-danylchenko committed Nov 11, 2024
2 parents 54d2547 + dabed48 commit b41d12d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { FC, ReactNode, useCallback, useRef, useEffect, useMemo, useState } from 'react';

import { useAnnotator, useSelection } from '@annotorious/react';
import {
isRevived,
Expand All @@ -9,7 +8,6 @@ import {
type TextAnnotation,
type TextAnnotator
} from '@soomo/text-annotator';

import {
arrow,
autoUpdate,
Expand Down Expand Up @@ -106,7 +104,7 @@ export const TextAnnotationPopup: FC<TextAnnotationPopupProps> = (props) => {

useEffect(() => {
const annotationSelector = annotation?.target.selector;
setOpen(isAnnotationIdling && annotationSelector?.length > 0 ? isRevived(annotationSelector) : false);
setOpen(isAnnotationIdling && annotationSelector?.length > 0 ? isRevived(annotationSelector) : false);
}, [annotation?.target?.selector, isAnnotationIdling]);

useEffect(() => {
Expand Down

0 comments on commit b41d12d

Please sign in to comment.