Make sure main container element gets width set when using right margin for negative size

This commit is contained in:
Davide P. Cervone 2015-12-06 07:49:24 -05:00
parent 757660863f
commit 21dd8a4b46

View File

@ -1691,7 +1691,10 @@
MML.math.Augment({
toCommonHTML: function (node) {
node = this.CHTMLdefaultNode(node);
if (this.CHTML.w < 0) node.parentNode.style.marginRight = CHTML.Em(this.CHTML.w);
if (this.CHTML.w < 0) {
node.parentNode.style.width = "0px";
node.parentNode.style.marginRight = CHTML.Em(this.CHTML.w);
}
var alttext = this.Get("alttext");
if (alttext && !node.getAttribute("aria-label")) node.setAttribute("aria-label",alttext);
if (!node.getAttribute("role")) node.setAttribute("role","math");