UBERF-8242 Fix scroll jumping in codeblock (#6695)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-09-24 10:50:32 +07:00 committed by GitHub
parent a9fcdfc61d
commit f43f247b5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -134,7 +134,7 @@ function createDecorations (doc: ProseMirrorNode, options: CodeBlockLowlightOpti
doc.descendants((node, pos) => {
if (node.type.name === CodeBlockLowlight.name) {
decorations.push(
Decoration.widget(pos + node.nodeSize - 1, (view) => {
Decoration.widget(pos + 1, (view) => {
const button = createLangButton(node.attrs.language)
if (view.editable) {