File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -824,7 +824,6 @@ class DrawingEditor extends AnnotationEditor {
824824 this . _currentParent = null ;
825825 DrawingEditor . #currentDraw = null ;
826826 DrawingEditor . #currentDrawingOptions = null ;
827- CurrentPointers . clearPointerType ( ) ;
828827 CurrentPointers . clearTimeStamp ( ) ;
829828 }
830829
Original file line number Diff line number Diff line change @@ -1923,6 +1923,8 @@ class AnnotationEditorUIManager {
19231923 * Change the editor mode (None, FreeText, Ink, ...)
19241924 * @param {number } mode
19251925 * @param {string|null } editId
1926+ * @param {boolean } [isFromUser] - true if the mode change is due to a
1927+ * user action.
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
@@ -1933,6 +1935,7 @@ class AnnotationEditorUIManager {
19331935 async updateMode (
19341936 mode ,
19351937 editId = null ,
1938+ isFromUser = false ,
19361939 isFromKeyboard = false ,
19371940 mustEnterInEditMode = false ,
19381941 editComment = false
@@ -1980,6 +1983,11 @@ class AnnotationEditorUIManager {
19801983 await this . #signatureManager?. loadSignatures ( ) ;
19811984 }
19821985
1986+ if ( isFromUser ) {
1987+ // reinitialize the pointer type when the mode is changed by the user
1988+ CurrentPointers . clearPointerType ( ) ;
1989+ }
1990+
19831991 this . setEditingState ( true ) ;
19841992 await this . #enableAll( ) ;
19851993 this . unselectAll ( ) ;
Original file line number Diff line number Diff line change @@ -2501,6 +2501,7 @@ class PDFViewer {
25012501 await this . #annotationEditorUIManager. updateMode (
25022502 mode ,
25032503 editId ,
2504+ /* isFromUser = */ true ,
25042505 isFromKeyboard ,
25052506 mustEnterInEditMode ,
25062507 editComment
You can’t perform that action at this time.
0 commit comments