Closed Bug 294358 Opened 19 years ago Closed 19 years ago

Touching document.getElementById("content") in an xpi extension breaks home page loading.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 294815

People

(Reporter: mark, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050513 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050513 Firefox/1.0+

This is in Firefox "1.1" build of 5/13/05:

The presence of the following line of top level Javascript code when loading an
XPI causes loss of display of home page(es) and the Bookmarks sidebar:

   gBrowser = document.getElementById("content");

It does not matter if gBrowser is later used--if
document.getElementById("content") is accessed, then the browser comes up with a
blank screen. Also affects loading an HTML page by command line etc.

This worked fine in Firefox 1.0 through 1.0.4.

For an example XPI file, see http://markdionne.com/kesireader.xpi, which
contains a trivial Javascript file (overlay.js) which causes this problem.



Reproducible: Always

Steps to Reproduce:
1.Using Firefox 1.1, get http://markdionne.com/kesireader.xpi and save the file.
2.Install it via Open File menu.
3.Run Firefox.

Actual Results:  
No home pages come up when you start Firefox. No sidebar either.

If you comment out the line that reads:
  gBrowser = document.getElementById("content");
(and reinstall) then everything is OK.

Expected Results:  
Works fine with Firefox 1.0.4.

Since this gBrowser object is likely to be used like this:
  gBrowser.addEventListener("mouseup", browserMouseUpHandler, false);
it is painful not to be able to touch it at initialization time.
When did this start to appear?
(In reply to comment #1)
> When did this start to appear?

The 5/13/05 build was the first time I tried it in Firefox "1.1". It works fine
in 1.0.4.
Same as file at www.markdionne.com mentioned in the report.
I believe this was fixed by the patch for Bug 294815, reporter can you please
test this in *today's* 20050519 nightly (not out yet at the time of writing) or
a current tinderbox build.
Aaargh, I meant the 20050520 nightly not the 20050519 nightly, sorry losing
track of time here. :-)
With the 20050520 nightly, the home page NEVER displays, even with all
extensions removed. In addition, when I click on a bookmark in the sidebar, the
page opens but the address bar never updates.

Seems like some pretty massive breakage. I guess I will try again on Monday 5/23.
Created a new profile from scratch, and problems no longer happen with 20050520
nightly. 

BUT, noticed that <user profile>/extensions/extensions.RDF is not being written
at all by 1.1. Entered as new bug 294967.
(In reply to comment #7)
> Created a new profile from scratch, and problems no longer happen with 20050520
> nightly. 

OK there are probably still a lot of issues with this nightly due to the big
changes from Bug 281988, but as long as your specific problem is now fixed I'll
close this bug.

> BUT, noticed that <user profile>/extensions/extensions.RDF is not being written
> at all by 1.1. Entered as new bug 294967.

The extensions.rdf has been moved to <user profile>/extensions.RDF in nightlies.

*** This bug has been marked as a duplicate of 294815 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: