Bug #901
closedbug: StdGridLayoutImpl.js in 3.1.10
0%
Description
the last change of StdGridLayoutImpl.js make WHBoxLayout with AlignLeft flag has different result than 3.1.9.
and sometimes make javascript crash. see the attachment files.
the only change:
3.1.9
if (!shallow) {
p = ch.parentNode;
w = p.offsetWidth - self.marginH(ch);
if (self.getColumn(col)) {
var cw = self.getColumn(col).style.width, cwl = cw.length;
if (cwl > 0 && cw[cwl-1] == '%') {
ch.style.position = 'absolute';
ch.style.width = w+'px';
}
}
}
3.1.10
if (!shallow) {
p = ch.parentNode;
w = p.offsetWidth - self.marginH(ch);
if (p.className == 'Wt-chwrap') {
if (!WT.isIE) {
ch.style.position = 'relative';
ch = ch.firstChild;
}
ch.style.width = w + 'px';
ch.style.position = 'absolute';
}
}
ch.style.width = w + 'px';
sometimes w<0 make javascript crash.
when i restore the StdGridLayoutImpl.min.js of version 3.1.9
the result is correct, and crash never found.
Files
KD Updated by Koen Deforche about 15 years ago
- Status changed from New to InProgress
KD Updated by Koen Deforche about 15 years ago
- Status changed from InProgress to Resolved
- Target version set to 3.1.11
Hey,
Good catch. I've fixed this (without reverting to 3.1.9 ;-) )
Regards,
koen
DQ Updated by DQ Qin about 15 years ago
Good job, koen!
DQ Updated by DQ Qin about 15 years ago
Hey, koen
latest git solve the crash.
but do you think the new layout result make sence when WHBoxLayout with AlignLeft flag?
my test1.cpp remain the "incorrect.gif" result!
DQ
DQ Updated by DQ Qin about 15 years ago
sorry,
it's my fault
i don't notice the StdGridLayoutImpl.C also changed.
Regards
DQ
KD Updated by Koen Deforche almost 15 years ago
- Status changed from Resolved to Closed
Resolved in Wt 3.1.11