Skip to content

Commit ad0d776

Browse files
committed
Improve handling of removal of   for IE in AlignBox
1 parent 214a230 commit ad0d776

File tree

1 file changed

+8
-1
lines changed
  • unpacked/jax/output/HTML-CSS

1 file changed

+8
-1
lines changed

unpacked/jax/output/HTML-CSS/jax.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,14 @@
12011201
},
12021202
alignBox: function (span,align,y) {
12031203
this.placeBox(span,0,y); // set y position (and left aligned)
1204-
if (this.msiePlaceBoxBug) {span.removeChild(span.lastChild.previousSibling)}
1204+
if (this.msiePlaceBoxBug) {
1205+
//
1206+
// placeBox() adds an extra  , so remove it here.
1207+
//
1208+
var node = span.lastChild;
1209+
while (node && node.nodeName !== "#text") {node = node.previousSibling}
1210+
if (node) {span.removeChild(node)}
1211+
}
12051212
var bbox = span.bbox; if (bbox.isMultiline) return;
12061213
var isRelative = bbox.width != null && !bbox.isFixed;
12071214
var r = 0, c = -bbox.w/2, l = "50%";

0 commit comments

Comments
 (0)