feat: Allow commenting in code (#5953)
* Allow commenting in code marks * Allow commenting in code blocks * Floating comment toolbar in code block
This commit is contained in:
@@ -74,7 +74,7 @@ function usePosition({
|
||||
// position at the top right of code blocks
|
||||
const codeBlock = findParentNode(isCode)(view.state.selection);
|
||||
|
||||
if (codeBlock) {
|
||||
if (codeBlock && view.state.selection.empty) {
|
||||
const element = view.nodeDOM(codeBlock.pos);
|
||||
const bounds = (element as HTMLElement).getBoundingClientRect();
|
||||
selectionBounds.top = bounds.top;
|
||||
|
||||
Reference in New Issue
Block a user