Closed Bug 521803 Opened 10 years ago Closed 9 years ago

tabbrowser.xml: "Error: this.mPanelContainer is null", opening MailNews

Categories

(SeaMonkey :: MailNews: Message Display, defect, major)

x86
Windows 2000
defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sgautherie, Assigned: mnyromyr)

References

()

Details

Attachments

(1 file)

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.4) Gecko/20091007 SeaMonkey/2.0] (release, rc1) (W2Ksp4)

{
Error: this.mPanelContainer is null
Source File: chrome://navigator/content/tabbrowser.xml
Line: 2294
}

Code is
{
2292       <constructor>
2293         <![CDATA[
2294           this.mCurrentBrowser = this.mPanelContainer.firstChild.firstChild;
}
Flags: wanted-seamonkey2.0?
Blocks: 521756
For now, don't do browser-related ctor/dtor stuff if no panelcontainer exists. 
This is just a kind of band-aid patch, since actually "tabbrowser" needs to learn how to deal with non-browser panels (see bug 513518).
Assignee: nobody → mnyromyr
Status: NEW → ASSIGNED
Attachment #408457 - Flags: superreview?(neil)
Attachment #408457 - Flags: review?(neil)
Comment on attachment 408457 [details] [diff] [review]
ground browser-related ctor/dtor stuff

>diff --git a/suite/browser/tabbrowser.xml b/suite/browser/tabbrowser.xml
>--- a/suite/browser/tabbrowser.xml
>+++ b/suite/browser/tabbrowser.xml
>@@ -2286,18 +2286,23 @@
>               this.mTabBox.selectedPanel = this.selectedTab.linkedBrowser.parentNode;
>             }
>           ]]>
>         </body>
>       </method>
> 
>       <constructor>
>         <![CDATA[
>+          // bindings derived from this may not have browser panels
>+          if (!this.mPanelContainer)
>+            return;
>+
>           this.mCurrentBrowser = this.mPanelContainer.firstChild.firstChild;
>           this.mCurrentTab = this.mTabContainer.firstChild;
>+
>           document.addEventListener("keypress", this._keyEventHandler, false);
>           this.mTabBox.handleCtrlTab = !/Mac/.test(navigator.platform);
>           this.arrowKeysShouldWrap = /Mac/.test(navigator.platform);
Do you want Ctrl+F4 and Ctrl+Tab to work in tabmail? (arrowKeysShouldWrap is for tab reordering, I don't know whether you support that.)
(In reply to comment #2)
> Do you want Ctrl+F4 and Ctrl+Tab to work in tabmail?

Well, finally both tabbrowsers should behave the same, so actually yes. If it's just moving a bunch of lines upwards to get this here, I'll try. But if it takes nifty lifting, I'd rather not fix code which may get throwsn away "soon" anyway...
Severity: normal → major
Flags: wanted-seamonkey2.0? → blocking-seamonkey2.0.1?
Not blocking releases on this, as the bug doesn't tell about any evidence that anything is actually broken.
Flags: blocking-seamonkey2.0.1? → blocking-seamonkey2.0.1-
Flags: wanted-seamonkey2.1?
Flags: wanted-seamonkey2.1?
Karsten, ping for update.
On WinXP, with or without this patch, Ctrl+Tab works for me in both MailNews and the browser, and Ctrl+F4 works only in the browser. Everything else seems to be fine as well. The only real difference is that the error message is gone (as expected). So if the behavior on Mac is OK as well this should be good to go. If it is not, someone with a Mac should just try and move the two lines up (before the if/return) and check again, then report, and one of us non-Mac users can check yet again. Nowhere in that process do we strictly have to wait for Mnyromyr. So if he's still busy we could ask stefanh (although I'm not sure he has more time) or do we have more Mac guys around?
(In reply to comment #6)
> On WinXP, with or without this patch, Ctrl+Tab works for me in both MailNews
> and the browser, and Ctrl+F4 works only in the browser.
Actually handleCtrlTab defaults to true, but Mac guys might want it disabled?
Ctrl+tab is supposed to move to the next frame in a web page on mac, but I guess we could drop it for making ctrl+tab work in the browser (since it works in mailNews. The only "problem" then is that we would have 3 different key combos for moving to next/previous tab on mac (Cmd+Alt+left/right arrow, Ctrl+Page Up/Down, Ctrl (Ctrl+Shift)+Tab), but that's something Firefox has as well.
(In reply to comment #8)
> in mailNews. The only "problem" then is that we would have 3 different key
> combos for moving to next/previous tab on mac
In browser and mailNews
(I was just reminding myself of this bug, and would still like to see it fixed even if it wasn't marked as wanted-seamonkey2.1.)
Depends on: 628918
> Error: this.mPanelContainer is null
> Source File: chrome://navigator/content/tabbrowser.xml

OK I fixed this in Bug 628918 but I'm now getting the following errors:

Error: browsers[i] is undefined
Source file: chrome://navigator/content/tabbrowser.xml
Line: 2840
 ----------
Error: 'JavaScript component does not have a method named: "onBeforeLinkTraversal"' when calling method: [nsIXULBrowserWindow::onBeforeLinkTraversal] = NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
 ----------
Error: 'JavaScript component does not have a method named: "addAttachmentField"' when calling method: [nsIMsgHeaderSink::addAttachmentField] = NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
 ----------
Error: this.mCurrentBrowser is null
Source file: chrome://navigator/content/tabbrowser.xml
(In reply to comment #11)
> Error: browsers[i] is undefined
> Source file: chrome://navigator/content/tabbrowser.xml
> Line: 2840

I've seen this for a while already but cannot remember whether it was on branch or trunk or whether add-ons are involved.

> Error: 'JavaScript component does not have a method named:
> "onBeforeLinkTraversal"' when calling method:
> [nsIXULBrowserWindow::onBeforeLinkTraversal] =
> NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED

This is your bug 609034.

> Error: 'JavaScript component does not have a method named:
> "addAttachmentField"' when calling method:
> [nsIMsgHeaderSink::addAttachmentField] =
> NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED

This is bug 26517.
>> Error: 'JavaScript component does not have a method named:
>> "onBeforeLinkTraversal"' when calling method:
>> [nsIXULBrowserWindow::onBeforeLinkTraversal] =
>> NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
> 
> This is your bug 609034.
This was fixed by KaiRo in Bug 610736. So why is the error still occurring?

>> Error: 'JavaScript component does not have a method named:
>> "addAttachmentField"' when calling method:
>> [nsIMsgHeaderSink::addAttachmentField] =
>> NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
> 
> This is bug 26517.
Please land this!
(In reply to comment #13)
> >> Error: 'JavaScript component does not have a method named:
> >> "onBeforeLinkTraversal"' when calling method:
> >> [nsIXULBrowserWindow::onBeforeLinkTraversal] =
> >> NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
> > 
> > This is your bug 609034.
> This was fixed by KaiRo in Bug 610736. So why is the error still occurring?

Just a guess: mailWindow.js (assignment on line 129, impl. starting on line 345).

> >> Error: 'JavaScript component does not have a method named:
> >> "addAttachmentField"' when calling method:
> >> [nsIMsgHeaderSink::addAttachmentField] =
> >> NS_ERROR_XPC_JSOBJECT_HAS_NO_FUNCTION_NAMED
> > 
> > This is bug 26517.
> Please land this!

Well, I was hoping/waiting for an answer from Karsten but since I didn't get one but an sr+ from Neil, will do what you said now!
Fixed in Bug 628918
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
No longer blocks: 521756
Comment on attachment 408457 [details] [diff] [review]
ground browser-related ctor/dtor stuff

obsolete review requests.
Attachment #408457 - Attachment description: ground browser-related ctor/dtor stuff → ground browser-related ctor/dtor stuff
Attachment #408457 - Flags: superreview?(neil)
Attachment #408457 - Flags: review?(neil)
You need to log in before you can comment on or make changes to this bug.