From 6ccf13e624f6c9eaa6f5049305386a01116cde3a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 20 Dec 2012 10:37:51 +0000 Subject: [PATCH] Widgets and macro calls should be spans not divs Although it does mean that we'll end up creating divs inside spans, which isn't strictly legal but works in all browsers --- core/modules/rendertree/renderers/macrocall.js | 2 +- core/modules/rendertree/renderers/widget.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/modules/rendertree/renderers/macrocall.js b/core/modules/rendertree/renderers/macrocall.js index d92ccdf57..d667a5f44 100644 --- a/core/modules/rendertree/renderers/macrocall.js +++ b/core/modules/rendertree/renderers/macrocall.js @@ -83,7 +83,7 @@ MacroCallRenderer.prototype.render = function(type) { MacroCallRenderer.prototype.renderInDom = function() { // Create the element - this.domNode = document.createElement("div"); + this.domNode = document.createElement("span"); this.domNode.setAttribute("data-macro-name",this.parseTreeNode.name); // Render any child nodes var self = this; diff --git a/core/modules/rendertree/renderers/widget.js b/core/modules/rendertree/renderers/widget.js index a8fc75cb8..335fcbc07 100644 --- a/core/modules/rendertree/renderers/widget.js +++ b/core/modules/rendertree/renderers/widget.js @@ -77,7 +77,7 @@ WidgetRenderer.prototype.render = function(type) { WidgetRenderer.prototype.renderInDom = function() { // Create the wrapper element - this.domNode = document.createElement("div"); + this.domNode = document.createElement("span"); this.domNode.setAttribute("data-widget-type",this.parseTreeNode.tag); this.domNode.setAttribute("data-widget-attr",JSON.stringify(this.attributes)); // Render the widget if we've got one