File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -820,7 +820,6 @@ class DrawingEditor extends AnnotationEditor {
820820 this . _currentParent = null ;
821821 DrawingEditor . #currentDraw = null ;
822822 DrawingEditor . #currentDrawingOptions = null ;
823- CurrentPointers . clearPointerType ( ) ;
824823 CurrentPointers . clearTimeStamp ( ) ;
825824 }
826825
Original file line number Diff line number Diff line change @@ -1877,13 +1877,16 @@ class AnnotationEditorUIManager {
18771877 * edit mode.
18781878 * @param {boolean } [editComment] - true if the mode change is due to a
18791879 * comment edit.
1880+ * @param {boolean } [isFromEvent] - true if the mode change is due to an event
1881+ * (e.g. toolbar button clicked).
18801882 */
18811883 async updateMode (
18821884 mode ,
18831885 editId = null ,
18841886 isFromKeyboard = false ,
18851887 mustEnterInEditMode = false ,
1886- editComment = false
1888+ editComment = false ,
1889+ isFromEvent = false
18871890 ) {
18881891 if ( this . #mode === mode ) {
18891892 return ;
@@ -1921,6 +1924,10 @@ class AnnotationEditorUIManager {
19211924 if ( mode === AnnotationEditorType . SIGNATURE ) {
19221925 await this . #signatureManager?. loadSignatures ( ) ;
19231926 }
1927+ if ( isFromEvent ) {
1928+ // reinitialize the pointer type when mode changed by an event
1929+ CurrentPointers . clearPointerType ( ) ;
1930+ }
19241931
19251932 this . setEditingState ( true ) ;
19261933 await this . #enableAll( ) ;
You can’t perform that action at this time.
0 commit comments