File tree Expand file tree Collapse file tree
packages/superdoc/src/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1226,6 +1226,11 @@ export class SuperDoc extends EventEmitter {
12261226 /**
12271227 * Scroll the document to a given comment by id.
12281228 *
1229+ * This is a lightweight DOM-based scroll that does **not** move the editing
1230+ * caret or depend on the layout engine. Use {@link navigateTo} instead when
1231+ * you need to place the caret inside the comment range (e.g. for deep links
1232+ * or programmatic editing).
1233+ *
12291234 * @param {string } commentId The comment id
12301235 * @param {{ behavior?: ScrollBehavior, block?: ScrollLogicalPosition } } [options]
12311236 * @returns {boolean } Whether a matching element was found
@@ -1464,6 +1469,10 @@ export class SuperDoc extends EventEmitter {
14641469 * Prefers the active document's PresentationEditor because navigation depends
14651470 * on rendered layout rather than raw editor commands.
14661471 *
1472+ * For comments this moves the caret into the comment range and activates the
1473+ * thread. If you only need to scroll a comment into view without moving the
1474+ * caret, use {@link scrollToComment} instead.
1475+ *
14671476 * Note: bookmark navigation currently supports the body and header/footer
14681477 * stories. Footnote/endnote bookmark navigation returns `false`.
14691478 *
You can’t perform that action at this time.
0 commit comments