-
-
Notifications
You must be signed in to change notification settings - Fork 634
fix: Scrolling bug when clicking comment marks #2165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
matthewlipski marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -245,7 +245,7 @@ export class CommentsPlugin extends BlockNoteExtension { | |
| ); | ||
|
|
||
| const threadId = commentMark?.attrs.threadId as string | undefined; | ||
| self.selectThread(threadId, false); | ||
| self.selectThread(threadId); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the second param? Why is it removed
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You could set it to false to prevent scrolling to the mark ( |
||
| }, | ||
| }, | ||
| }), | ||
|
|
@@ -289,10 +289,11 @@ export class CommentsPlugin extends BlockNoteExtension { | |
|
|
||
| // When a new thread is selected, scrolls the page to its reference text in | ||
| // the editor. | ||
| ( | ||
| this.editor.prosemirrorView?.domAtPos(selectedThreadPosition.from) | ||
| .node as Element | undefined | ||
| )?.scrollIntoView({ | ||
| const node = this.editor.prosemirrorView?.domAtPos( | ||
| selectedThreadPosition.from, | ||
| ).node as Element | undefined; | ||
|
|
||
| node?.scrollIntoView({ | ||
matthewlipski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| behavior: "smooth", | ||
| block: "center", | ||
| }); | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Always happy to remove an effect! |
Uh oh!
There was an error while loading. Please reload this page.