Closed pmario closed 5 years ago
@pmario I can reproduce this, though I don't know the root of the problem
I was able to "fix" the error in utils/fakedom.js
:
TW_Element.prototype.appendChild = function(node) {
this.children.push(node);
try {
node.parentNode = this;
}
catch(e) {}
};
... don't know how expensive this is
This problem doesn't show in 5.1.17
No, it shows in 5.1.17, too. Try the combination of CodeMirror + tools for exploring tiddlywiki internals
The CodeMirror engine.js causes the error when trying to append cmDomNode
through self.domNode.appendChild(cmDomNode);
(around line 112 in engine.js)
I found another way to solve this...
line 110 in codemirror's engine.js:
this.cm = window.CodeMirror(function(cmDomNode) {
Object.defineProperty(cmDomNode,'parentNode',{writable: true});
self.domNode.appendChild(cmDomNode);
},config);
See my comment over on #3554: https://github.com/Jermolene/TiddlyWiki5/pull/3554#issuecomment-439984398
thanks @Jermolene, I've changed the PR so that it detects the Tiddlywiki FakeDom
to reproduce:
This problem doesn't show in 5.1.17