Open
Bug 1233104
Opened 9 years ago
Updated 2 years ago
treecol not restoring persisted ordinal value
Categories
(Core :: XUL, defect)
Tracking
()
UNCONFIRMED
People
(Reporter: josh, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0
Build ID: 20150428125633
Steps to reproduce:
if you defined a tree like this:
<tree id="list.parts" class="plain" enableColumnDrag="true" flex="1" seltype="single">
<treecols id="list.parts.treecols">
<treecol id="list.parts.partnumber" persist="hidden width ordinal" label="Part #" primary="true" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="list.parts.quantity" persist="hidden width ordinal" label="Part Qty" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="list.parts.description" persist="hidden width ordinal" label="Description" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="list.parts.failure" persist="hidden width ordinal" label="Failure" flex="1"/>
</treecols>
<treechildren/>
</tree>
it will save the persisted width, hidden and ordinal values; but it will only restore width and hidden properly, ordinal will not be, even though it is saved.
"list.parts.partnumber": {
"ordinal": "3",
"width": "97"
},
"list.parts.quantity": {
"ordinal": "1",
"width": "91"
},
"list.parts.description": {
"ordinal": "5",
"width": "642"
},
"list.parts.failure": {
"ordinal": "7",
"width": "429",
"hidden": "true"
}
if you now take remove treechildren and define the tree like this:
<tree id="list.parts" class="plain" enableColumnDrag="true" flex="1" seltype="single">
<treecols id="list.parts.treecols">
<treecol id="list.parts.partnumber" persist="hidden width ordinal" label="Part #" primary="true" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="list.parts.quantity" persist="hidden width ordinal" label="Part Qty" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="list.parts.description" persist="hidden width ordinal" label="Description" flex="1"/>
<splitter class="tree-splitter"/>
<treecol id="list.parts.failure" persist="hidden width ordinal" label="Failure" flex="1"/>
</treecols>
</tree>
It will restore all 3 properly...
We are following https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/Custom_Tree_Views
and have implemented our own custom tree view, it all works properly except for this one bug.
Even if we don't attach the tree view and just leave it as a plain tree as defined in the xul and not attach with treeElement.view it still does the same thing, so we do not think it is a bug in the custom tree view but at the xul level.
We have gotten around this by dynamically creating a treechildren in our custom tree view code after the dom as been loaded and the ordinal persist value successfully restore, and then attaching it before treeElement.view is called with
let treeChildrenElement = document.createElementNS(XULNS,"treechildren"); this.treeElement.appendChild(treeChildrenElement);
This seems to work fine and everything is okay, but it requires us now to pass attributes needed on treechildren to the custom tree view object then into treeChildElement before it gets appended.
Actual results:
Restored width and hidden persisted values but not ordinal.
Expected results:
Restored ordinal values as well.
Reporter | ||
Updated•9 years ago
|
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Comment 1•9 years ago
|
||
This also seems to be the case with Arch Linux x86_64, XulRunner v42 and Firefox v42.
Reporter | ||
Updated•9 years ago
|
Version: 34 Branch → 35 Branch
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•