1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-25 17:40:29 +00:00

The reveal widget should generate a span when in inline mode

The only reason that the reveal widget generates an element is so that
we can use `display:none/block;` (as did the pre-refactored code) as a
quick way of hiding and showing the content. We don't do that yet, and
it may be best never to do it.
This commit is contained in:
Jeremy Ruston 2013-10-16 16:29:35 +01:00
parent 06e269f3cb
commit 7f6d770ca6

View File

@ -30,7 +30,7 @@ RevealWidget.prototype.render = function(parent,nextSibling) {
this.parentDomNode = parent; this.parentDomNode = parent;
this.computeAttributes(); this.computeAttributes();
this.execute(); this.execute();
var domNode = this.document.createElement("div"); var domNode = this.document.createElement(this.parseTreeNode.isBlock ? "div" : "span");
parent.insertBefore(domNode,nextSibling); parent.insertBefore(domNode,nextSibling);
this.renderChildren(domNode,null); this.renderChildren(domNode,null);
if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) { if(!domNode.isTiddlyWikiFakeDom && this.type === "popup" && this.isOpen) {