Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/display/editor/draw.js
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,6 @@ class DrawingEditor extends AnnotationEditor {
this._currentParent = null;
DrawingEditor.#currentDraw = null;
DrawingEditor.#currentDrawingOptions = null;
CurrentPointers.clearPointerType();
CurrentPointers.clearTimeStamp();
}

Expand Down
8 changes: 8 additions & 0 deletions src/display/editor/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -1923,6 +1923,8 @@ class AnnotationEditorUIManager {
* Change the editor mode (None, FreeText, Ink, ...)
* @param {number} mode
* @param {string|null} editId
* @param {boolean} [isFromUser] - true if the mode change is due to a
* user action.
* @param {boolean} [isFromKeyboard] - true if the mode change is due to a
* keyboard action.
* @param {boolean} [mustEnterInEditMode] - true if the editor must enter in
Expand All @@ -1933,6 +1935,7 @@ class AnnotationEditorUIManager {
async updateMode(
mode,
editId = null,
isFromUser = false,
isFromKeyboard = false,
mustEnterInEditMode = false,
editComment = false
Expand Down Expand Up @@ -1980,6 +1983,11 @@ class AnnotationEditorUIManager {
await this.#signatureManager?.loadSignatures();
}

if (isFromUser) {
// reinitialize the pointer type when the mode is changed by the user
CurrentPointers.clearPointerType();
}

this.setEditingState(true);
await this.#enableAll();
this.unselectAll();
Expand Down
1 change: 1 addition & 0 deletions web/pdf_viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,7 @@ class PDFViewer {
await this.#annotationEditorUIManager.updateMode(
mode,
editId,
/* isFromUser = */ true,
isFromKeyboard,
mustEnterInEditMode,
editComment
Expand Down