Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Error when adding new lines to cells with breakpoints #159

Closed
jtpio opened this issue Nov 7, 2019 · 2 comments · Fixed by #160
Closed

Error when adding new lines to cells with breakpoints #159

jtpio opened this issue Nov 7, 2019 · 2 comments · Fixed by #160
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jtpio
Copy link
Member

jtpio commented Nov 7, 2019

Following these steps:

  • Add a breakpoint to a cell
  • Edit the cell by adding a new line

Triggers this error:

Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node

new-lines-cell-bps

@jtpio jtpio added the bug Something isn't working label Nov 7, 2019
@jtpio jtpio added this to the 0.1.0 milestone Nov 7, 2019
@jtpio
Copy link
Member Author

jtpio commented Nov 7, 2019

Wondering whether we still need to listen on renderLine events:

protected onNewRenderLine = (editor: Editor, line: any) => {
const lineInfo = editor.lineInfo(line);
if (lineInfo.handle && lineInfo.handle.order === false) {
return;
}
const doc: Doc = editor.getDoc();
const linesNumber = doc.lineCount();
if (this.previousLineCount !== linesNumber) {
let lines: number[] = [];
doc.eachLine(line => {
if ((line as ILineInfo).gutterMarkers) {
const lineInfo = editor.lineInfo(line);
lines.push(lineInfo.line + 1);
}
});
this.breakpointsModel.changeLines(lines);
this.previousLineCount = linesNumber;
}
};

@jtpio
Copy link
Member Author

jtpio commented Nov 7, 2019

Eventually we will want to replace this logic to send the dumpCell and setBreakpoints requests when a user modifies the content of a cell.

@jtpio jtpio self-assigned this Nov 7, 2019
KsavinN added a commit that referenced this issue Nov 7, 2019
Remove onNewRenderLine
this resolve #159
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant