Use element.ownerDocument instead of document.
This commit is contained in:
parent
6fdb285562
commit
0759ee67dd
3 changed files with 8 additions and 5 deletions
|
|
@ -121,8 +121,8 @@ var Text = function(parentEl) {
|
|||
// Note: characterWidth can be a float!
|
||||
measureNode.innerHTML = lang.stringRepeat("Xy", n);
|
||||
|
||||
if (document.body) {
|
||||
document.body.appendChild(measureNode);
|
||||
if (this.element.ownerDocument.body) {
|
||||
this.element.ownerDocument.body.appendChild(measureNode);
|
||||
} else {
|
||||
var container = this.element.parentNode;
|
||||
while (!dom.hasCssClass(container, "ace_editor"))
|
||||
|
|
@ -257,7 +257,7 @@ var Text = function(parentEl) {
|
|||
};
|
||||
|
||||
this.$renderLinesFragment = function(config, firstRow, lastRow) {
|
||||
var fragment = document.createDocumentFragment(),
|
||||
var fragment = this.element.ownerDocument.createDocumentFragment(),
|
||||
row = firstRow,
|
||||
fold = this.session.getNextFold(row),
|
||||
foldStart = fold ?fold.start.row :Infinity;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue