Project

General

Profile

Actions

Bug #901

closed
DQ KD

bug: StdGridLayoutImpl.js in 3.1.10

Bug #901: bug: StdGridLayoutImpl.js in 3.1.10

Added by DQ Qin about 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
High
Assignee:
Target version:
Start date:
07/14/2011
Due date:
% Done:

0%

Estimated time:

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

test1.cpp (1.21 KB) test1.cpp DQ Qin, 07/14/2011 04:38 AM
incorrect.gif (3.02 KB) incorrect.gif DQ Qin, 07/14/2011 04:38 AM
correct.gif (3.04 KB) correct.gif DQ Qin, 07/14/2011 04:38 AM

KD Updated by Koen Deforche about 15 years ago Actions #1

  • Status changed from New to InProgress

KD Updated by Koen Deforche about 15 years ago Actions #2

  • 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 Actions #3

Good job, koen!

DQ Updated by DQ Qin about 15 years ago Actions #4

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 Actions #5

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 Actions #6

  • Status changed from Resolved to Closed

Resolved in Wt 3.1.11

Actions

Also available in: PDF Atom