commit ad0d7760f0ebd1fecd5adb5179b776d5ae7ce991
parent 214a23050495261d8dafb8b77641cebd9da59bf6
Author: Davide P. Cervone <dpvc@union.edu>
Date: Wed, 7 May 2014 05:29:31 -0400
Improve handling of removal of for IE in AlignBox
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js
@@ -1201,7 +1201,14 @@
},
alignBox: function (span,align,y) {
this.placeBox(span,0,y); // set y position (and left aligned)
- if (this.msiePlaceBoxBug) {span.removeChild(span.lastChild.previousSibling)}
+ if (this.msiePlaceBoxBug) {
+ //
+ // placeBox() adds an extra , so remove it here.
+ //
+ var node = span.lastChild;
+ while (node && node.nodeName !== "#text") {node = node.previousSibling}
+ if (node) {span.removeChild(node)}
+ }
var bbox = span.bbox; if (bbox.isMultiline) return;
var isRelative = bbox.width != null && !bbox.isFixed;
var r = 0, c = -bbox.w/2, l = "50%";