For reference:
https://github.com/mozilla/pdf.js/issues/15571#issuecomment-1278141781
if (
      !isCommitting &&
      this.#uiManager.getMode() !== AnnotationEditorType.INK
    ) {
      return;
    }
    if (!isCommitting) {
      
      
      for (const editor of this.#editors.values()) {
        if (editor.isEmpty()) {
          editor.setInBackground();
          return;
        }
      }
    }
    const editor = this.#createAndAddNewEditor({ offsetX: 0, offsetY: 0 });
    editor.setInBackground();
  }
  /**
   * Set the editing state.
   * @param {boolean} isEditing
   */
  setEditingState(isEditing) {