mirror of
https://git.proxmox.com/git/mirror_xterm.js
synced 2025-11-03 05:09:51 +00:00
On big refreshes remove term.rowContainer instead of term.element from DOM
Fix #120
This commit is contained in:
parent
a6e85ad5f5
commit
af7588ef16
11
src/xterm.js
11
src/xterm.js
@ -1229,9 +1229,12 @@
|
||||
|
||||
var x, y, i, line, out, ch, width, data, attr, bg, fg, flags, row, parent, focused = document.activeElement;
|
||||
|
||||
// If this is a big refresh, remove the terminal rows from the DOM for faster calculations
|
||||
if (end - start >= this.rows / 2) {
|
||||
parent = this.element.parentNode;
|
||||
if (parent) parent.removeChild(this.element);
|
||||
if (parent) {
|
||||
this.element.removeChild(this.rowContainer);
|
||||
}
|
||||
}
|
||||
|
||||
width = this.cols;
|
||||
@ -1378,13 +1381,9 @@
|
||||
}
|
||||
|
||||
if (parent) {
|
||||
parent.appendChild(this.element);
|
||||
this.element.appendChild(this.rowContainer);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return focus to previously focused element
|
||||
*/
|
||||
focused.focus();
|
||||
this.emit('refresh', {element: this.element, start: start, end: end});
|
||||
};
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user