Skip to content

Commit 55c88eb

Browse files
committed
Fix HTML-CSS bounding boxes for annotation-xml nodes when used illegally as first semantics child.
1 parent 48b594a commit 55c88eb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

unpacked/jax/output/HTML-CSS/autoload/annotation-xml.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () {
4848
toHTML: function (span,encoding) {
4949
for (var i = 0, m = this.data.length; i < m; i++)
5050
{span.appendChild(this.data[i].cloneNode(true))}
51-
span.bbox.w = HTMLCSS.getW(span); span.bbox.rw = span.bbox.w;
51+
var bbox = span.bbox; span.bbox = null;
52+
bbox.rw = bbox.w = HTMLCSS.getW(span);
5253
var HD = HTMLCSS.getHD(span);
53-
span.bbox.h = HD.h; span.bbox.d = HD.d;
54+
bbox.h = HD.h; bbox.d = HD.d;
55+
span.bbox = bbox;
5456
}
5557
});
5658

0 commit comments

Comments
 (0)