Open
Bug 755380
Opened 12 years ago
Updated 2 years ago
view attribute of <tree> is null on some conditions
Categories
(Toolkit :: UI Widgets, defect)
Toolkit
UI Widgets
Tracking
()
NEW
People
(Reporter: ochameau, Unassigned)
References
Details
Attachments
(1 file)
2.18 KB,
text/javascript
|
Details |
We got a report about a XUL addon being broken by some Jetpack code. We ended up identifying a set of conditions where `view` attribute of a xul tree node end up being nullified for unknown reasons. Here is minimal conditions required to reproduce it: 1/ The <tree> node should live in a <dialog>. (It won't fail in a <window>) 2/ A <script> tag should be placed *before* the <tree> node. And this script should be a chrome:// URL. It won't fail with a data URI. 3/ Some code has to access the dialog element during window loading. (Some jetpack addons are doing that) 1/ and 2/ conditions are fullfilled by Session manager addon. There is chances other addons are facing the same issue, as a similar bug has been reported in bug 739388. I've attached a scratchpad code that show a very minimal testcase to reproduce this issue.
Comment 1•12 years ago
|
||
The code here handles getting the tree view again and looks like it will return null if it can't get the tree body's frame: http://mxr.mozilla.org/mozilla-central/source/layout/xul/base/src/tree/src/nsTreeBoxObject.cpp#161 A rough guess from looking at the code is that if you set the view and then try to get it again before layout has occurred then you'll get null back, waiting until after layout has completed might give you the view again.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•