Improve handling of removal of   for IE in AlignBox

This commit is contained in:
Davide P. Cervone 2014-05-07 05:29:31 -04:00
parent 214a230504
commit ad0d7760f0

View File

@ -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%";