提交 3ee82182 编写于 作者: K Kohsuke Kawaguchi

when setting outerHTML, the element itself is replaced, so we've been applying...

when setting outerHTML, the element itself is replaced, so we've been applying behaviours to the wrong tree.
上级 38bc686b
......@@ -66,7 +66,10 @@ THE SOFTWARE.
e.appendChild(p); // Needs to be first for IE
// Use "outerHTML" for IE; workaround for:
// http://www.quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html
if (p.outerHTML) p.outerHTML = '<pre>'+text+'</pre>';
if (p.outerHTML) {
p.outerHTML = '<pre>'+text+'</pre>';
p = e.lastChild;
}
else p.innerHTML = text;
Behaviour.applySubtree(p);
if(stickToBottom) scroller.scrollToBottom();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册