Skip to content

Commit 637d434

Browse files
pxoralehander92
authored andcommitted
fix: Issue with unique selectors for zoneDom and nested editor components
1 parent dcc2c98 commit 637d434

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/frontend/ui/editor.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,13 +1154,13 @@ proc loadFlow*(self: EditorViewComponent, flowMode: FlowMode, location: types.Lo
11541154

11551155
proc drawDiffViewZones(self: EditorViewComponent, source: cstring, id: int, lineNumber: int): Node =
11561156
var zoneDom = document.createElement("div")
1157-
zoneDom.id = fmt"diff-view-zone-{id}"
1157+
zoneDom.id = fmt"diff-view-zone-{self.id}-{id}"
11581158
zoneDom.class = "diff-view-zone"
11591159
zoneDom.style.display = "flex"
11601160
zoneDom.style.fontSize = cstring($self.data.ui.fontSize) & cstring"px"
11611161

11621162
var editorDom = document.createElement("div")
1163-
var selector = fmt"diffEditorComponent-{id}"
1163+
var selector = fmt"diffEditorComponent-{self.id}-{id}"
11641164
editorDom.id = selector
11651165

11661166
let editorContentLeft = self.monacoEditor

0 commit comments

Comments
 (0)