Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Implemented PR feedback
  • Loading branch information
matthewlipski committed Nov 10, 2025
commit a5ccd28668131847ed3955eb1961ec3c8a580397
2 changes: 0 additions & 2 deletions examples/07-collaboration/05-comments/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ function Document() {
);

return (
// <div style={{ height: "1000px", overflow: "scroll", position: "relative" }}>
<BlockNoteView
className={"comments-main-container"}
editor={editor}
Expand All @@ -110,6 +109,5 @@ function Document() {
/>
</div>
</BlockNoteView>
// </div>
);
}
7 changes: 0 additions & 7 deletions examples/07-collaboration/05-comments/src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,3 @@
max-height: 200px;
overflow: auto !important;
}

/* .bn-editor,
.bn-container {
position: relative;
overflow: none !important;
height: fit-content;
} */
13 changes: 6 additions & 7 deletions packages/core/src/extensions/Comments/CommentsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export class CommentsPlugin extends BlockNoteExtension {
/**
* Set the selected thread
*/
public selectThread(threadId: string | undefined, scrollToThread = true) {
public selectThread(threadId: string | undefined) {
if (this.selectedThreadId === threadId) {
return;
}
Expand All @@ -280,7 +280,7 @@ export class CommentsPlugin extends BlockNoteExtension {
}),
);

if (threadId && scrollToThread) {
if (threadId) {
const selectedThreadPosition = this.threadPositions.get(threadId);

if (!selectedThreadPosition) {
Expand All @@ -289,11 +289,10 @@ export class CommentsPlugin extends BlockNoteExtension {

// When a new thread is selected, scrolls the page to its reference text in
// the editor.
const node = this.editor.prosemirrorView?.domAtPos(
selectedThreadPosition.from,
).node as Element | undefined;

node?.scrollIntoView({
(
this.editor.prosemirrorView?.domAtPos(selectedThreadPosition.from)
.node as Element | undefined
)?.scrollIntoView({
behavior: "smooth",
block: "center",
});
Expand Down
Loading