Closed
Bug 293666
Opened 20 years ago
Closed 19 years ago
tabbox exception when tab added dynamically.
Categories
(Core :: Widget, defect)
Tracking
()
RESOLVED
EXPIRED
People
(Reporter: pwilson, Unassigned)
Details
Attachments
(1 file)
|
15.86 KB,
image/gif
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050507 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050507 Firefox/1.0+
Adding tab's dynamically to a tabbox leads exception 2147500037 when the tab is
selected.
Reproducible: Always
Steps to Reproduce:
1. Include the following in an XUL form:
<tabbox id="tabbox" flex="1">
<tabs id="tabs" orient="horizontal"/>
<tabpanels id="tabpanels" flex="1"/>
</tabbox>
2. Include the following in onload handler for form:
var tabs = document.getElementById("tabs");
//var tab = tabs.appendItem(pageElem.getAttribute("label"),"V1");
var tab = document.createElementNS(XUL_NS, "tab");
tab.setAttribute("label", "label");
tabs.appendChild(tab);
3.
Actual Results:
Expected Results:
The tabbox is malformed with the tabs to the right of the tabbox. Selecting a tab
gives: Error: uncaught exception: 2147500037
The ontents of the tabbox appear to be completely malformed compared to a
statically generated one. (see included gif image).
This appears to have been happening for some time as I discovered a partial
work-around in the Venkman venkman-views.js file line 2936 where a dummy hidden
tab is used to kick-start the insertion of new tabs.
However, the problem appears to be deaper, as I tried this trick and got a
tabbox with some tabs aligned left and some aligned right. i.e. the work around
is unreliable.
This problem occurs whether you add the tab using tabs.appendChild or the
tabs.insertItem methods.| Reporter | ||
Comment 1•20 years ago
|
||
Notice that DOMInspector shows no tab's within the tabs element - but they are present on the form.
| Reporter | ||
Comment 2•20 years ago
|
||
Problem partially solved. The exception is due to the fact that no tab is selected when content is generated. The assumption is made that one tab will always be selected. This is true for tabbox'es built from XUL source - but not for generated content. As far as I know tabbox is the only widget which doesn't work after you have simply appended content. The tabbox.xml selectNewTab lines #299 should not assume that any tab is selected. Alternatively, the first tab could be arbitrarily selected at line #224 and 275 instead of failing. Additionally the attributes first-tab and last-tab (which are used for CSS styling) are not maintained by methods: tabs.appendChild, insertItem, or appendItem. Users should not be expected to know these implementation details. Given that CSS3 now has first-child and last-child pseudo selectors, these attributes should be dropped and the CSS altered accordingly. The issue of why the tabs are right alligned is not yet resolved.
Comment 3•19 years ago
|
||
This is an automated message, with ID "auto-resolve01". This bug has had no comments for a long time. Statistically, we have found that bug reports that have not been confirmed by a second user after three months are highly unlikely to be the source of a fix to the code. While your input is very important to us, our resources are limited and so we are asking for your help in focussing our efforts. If you can still reproduce this problem in the latest version of the product (see below for how to obtain a copy) or, for feature requests, if it's not present in the latest version and you still believe we should implement it, please visit the URL of this bug (given at the top of this mail) and add a comment to that effect, giving more reproduction information if you have it. If it is not a problem any longer, you need take no action. If this bug is not changed in any way in the next two weeks, it will be automatically resolved. Thank you for your help in this matter. The latest beta releases can be obtained from: Firefox: http://www.mozilla.org/projects/firefox/ Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html Seamonkey: http://www.mozilla.org/projects/seamonkey/
Comment 4•19 years ago
|
||
This bug has been automatically resolved after a period of inactivity (see above comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
You need to log in
before you can comment on or make changes to this bug.
Description
•