Closed Bug 59511 Opened 24 years ago Closed 23 years ago

Can't change rows attribute on trees dynamically

Categories

(Core :: XUL, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.1

People

(Reporter: morse, Assigned: arik)

Details

Attachments

(5 files)

Attached is an example of a tree that contains four elements and initially has 
its rows attribute set to 2.  So it opens with two rows being displayed.  If you 
give it focus (by clicking on it), javascript gets executed which puts up an 
alert showing the initial value of rows (it is indeed 2) and then changes the 
rows attribute to 4.  But the display does not change. 

If you then click on the textfield in the example and then click back on the 
tree, the javascript routine gets called again.  The alert display indeed shows 
that rows is 4 at this time, but the tree is still displaying only two rows. 

If I do a display:none before changing the attribute and then a display:inline 
after changing it, the number of rows appearing on the screen is updated.  It 
would seem that this is a work-around for the bug.
QA Contact: sairuh → jrgm
nav triage team:

Why is this XP Apps? Reassinging to XP Toolkit/Widgets: Trees
Component: XP Apps → XP Toolkit/Widgets: Trees
->moz1.0
Target Milestone: --- → mozilla1.0
Here's an easy one.
Assignee: hyatt → arik
Target Milestone: mozilla1.0 → mozilla0.9
the test case that was posted doesn't seem to work anymore, crashes mozilla in 
fact.

i have a patch for the bug (on my work box, will attach on monday) but i need a 
new test case to make sure it works.

if someone could attach a new test case that works that would be awesome.
Status: NEW → ASSIGNED
It doesn't crash for me, but it doesn't display any values in the tree either.  
That's because of the xul syntax change that occured after this bug was 
reported.  Simply change all occurences of "value" to "label" and the attachment 
will display the problem.  I just tried that change and it still exhibits the 
original problem as reported.
to get this to run i had to remove the entire treechildren peice (even after
changing it to label)

when i click on the tree i get a js error about Expand not being defined.
I don't get the js error about expand not being defined.

But I'm also not observing the original problem described in this report.  I was 
wrong in my comment above that said that I could still reproduce the original 
comment.  So this probably got fixed somewhere along the line.

So feel free to close this out as WORFSFORME if you desire.
Oops, I meant to say:

   ... could still reproduce the original problem

instead of

   ... could still reproduce the original comment
arik: check with hyatt, or on n.p.m.xpfe for the full story on the xul syntax
changes.
Attached patch updated patchSplinter Review
ok, so i've figured out why the test case wasn't working (small problem in my
setup) and i've tested the new patch i included and it works, but you also have
to patch xul.css with the third patch because css was clobbering the rows= bit.

anyway this should fix the problem
Target Milestone: mozilla0.9 → mozilla0.9.1
+tree[rows] {
+height: auto;
+}
+

Indentation by one space for the height: auto; line would conform to prevailing
style, I think.  Total nit, all else looks good to me.

/be
sr=hyatt
fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Trees → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: