File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -1922,23 +1922,23 @@ class AnnotationEditorUIManager {
19221922  /** 
19231923   * Change the editor mode (None, FreeText, Ink, ...) 
19241924   * @param  {number } mode 
1925+    * @param  {boolean } [isFromUser] - true if the mode change is due to a 
1926+    *   user action. 
19251927   * @param  {string|null } editId 
19261928   * @param  {boolean } [isFromKeyboard] - true if the mode change is due to a 
19271929   *   keyboard action. 
19281930   * @param  {boolean } [mustEnterInEditMode] - true if the editor must enter in 
19291931   *   edit mode. 
19301932   * @param  {boolean } [editComment] - true if the mode change is due to a 
19311933   *   comment edit. 
1932-    * @param  {boolean } [isFromEvent] - true if the mode change is due to an event 
1933-    * (e.g. toolbar button clicked). 
19341934   */ 
19351935  async  updateMode ( 
19361936    mode , 
1937+     isFromUser  =  false , 
19371938    editId  =  null , 
19381939    isFromKeyboard  =  false , 
19391940    mustEnterInEditMode  =  false , 
1940-     editComment  =  false , 
1941-     isFromEvent  =  false 
1941+     editComment  =  false 
19421942  )  { 
19431943    if  ( this . #mode ===  mode )  { 
19441944      return ; 
@@ -1982,8 +1982,8 @@ class AnnotationEditorUIManager {
19821982    if  ( mode  ===  AnnotationEditorType . SIGNATURE )  { 
19831983      await  this . #signatureManager?. loadSignatures ( ) ; 
19841984    } 
1985-     if  ( isFromEvent )  { 
1986-       // reinitialize the pointer type when mode changed by an event  
1985+     if  ( isFromUser )  { 
1986+       // reinitialize the pointer type when the  mode is  changed by the user  
19871987      CurrentPointers . clearPointerType ( ) ; 
19881988    } 
19891989
Original file line number Diff line number Diff line change @@ -2500,6 +2500,7 @@ class PDFViewer {
25002500      this . #annotationEditorMode =  mode ; 
25012501      await  this . #annotationEditorUIManager. updateMode ( 
25022502        mode , 
2503+         true , 
25032504        editId , 
25042505        isFromKeyboard , 
25052506        mustEnterInEditMode , 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments