{"record":{"id":"a8315aa4a10cb785","repo":"ueberdosis/tiptap","slug":"tiptap-warn-duplicate-widget-decoration-key","errorCode":null,"errorMessage":"[tiptap warn]: Duplicate widget decoration key \"${key}\" in extension${extensions.size === 1 ? '' : 's'} ${names}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. `comment-${id}`).","messagePattern":"\\[tiptap warn\\]: Duplicate widget decoration key \"(.+?)\" in extension(.+?) (.+?)\\. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM\\. Use a stable, unique key \\(e\\.g\\. `comment-(.+?)`\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/decorations/DecorationManager.ts","lineNumber":378,"sourceCode":"    if (state.widgetKeys.size === 0) {\n      this.warnedWidgetKeys.clear()\n\n      return\n    }\n\n    const duplicateKeys = findDuplicateWidgetKeys(state.mergedDecorationSet)\n    const nextWarningKeys = new Set(duplicateKeys.map(({ key }) => key))\n\n    for (const { key, extensions } of duplicateKeys) {\n      if (this.warnedWidgetKeys.has(key)) {\n        continue\n      }\n\n      const names = Array.from(extensions)\n        .map(name => `\"${name}\"`)\n        .join(', ')\n\n      console.warn(\n        `[tiptap warn]: Duplicate widget decoration key \"${key}\" in extension${\n          extensions.size === 1 ? '' : 's'\n        } ${names}. Widget decoration keys must be globally unique, otherwise ProseMirror ` +\n          'misplaces the widget DOM. Use a stable, unique key (e.g. `comment-${id}`).',\n      )\n    }\n\n    this.warnedWidgetKeys = nextWarningKeys\n  }\n\n  /**\n   * Builds the merged DecorationSet during init. Skips the merge for a\n   * single extension since its per-extension set is already correct.\n   * @param doc The document to build the merged set for.\n   * @param decorationSetsByExtension The per-extension decoration sets.\n   * @returns The merged decoration set.\n   */\n  private buildMergedSet(","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/ueberdosis/tiptap/blob/496d53afd7e4e3c7424b4749adeff4f45e27ddb0/packages/core/src/decorations/DecorationManager.ts#L360-L396","documentation":"Error \"[tiptap warn]: Duplicate widget decoration key \"${key}\" in extension${extensions.size === 1 ? '' : 's'} ${names}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. `comment-${id}`).\" thrown in ueberdosis/tiptap.","triggerScenarios":"Thrown at packages/core/src/decorations/DecorationManager.ts:378 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"496d53afd7e4e3c7424b4749adeff4f45e27ddb0","analyzedAt":"2026-08-26T22:41:43.400Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}