File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -73,12 +73,13 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => {
7373  const  {  getFloatingProps }  =  useInteractions ( [ dismiss ,  role ] ) ; 
7474
7575  const  selectedKey  =  selected . map ( a  =>  a . annotation . id ) . join ( '-' ) ; 
76+ 
7677  useEffect ( ( )  =>  { 
7778    // Ignore all selection changes except those accompanied by a user event. 
78-     if  ( selected . length  >  0  &&  event )  { 
79-       setOpen ( event . type  ===  'pointerup'  ||  event . type  ===  'keydown' ) ; 
79+     if  ( selected . length  >  0 )   {   //  && event) {
80+       setOpen ( true ) ;   //  event.type === 'pointerup' || event.type === 'keydown');
8081    } 
81-   } ,  [ selectedKey ,  event ] ) ; 
82+   } ,  [ selectedKey   /* , event */ ] ) ; 
8283
8384  useEffect ( ( )  =>  { 
8485    // Close the popup if the selection is cleared 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments