Closed Bug 332330 Opened 18 years ago Closed 16 years ago

Extraneous "Open Web Location" dialog box appears when opening new window if homepage is about:blank

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: timecop, Unassigned)

References

()

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1

There appears to be a race condition when opening new firefox window.

If a user presses "Alt+D" while opening new browser window with Ctrl+N,
if the window is still appearing, a dialog pictured at http://pbx.mine.nu/wtf.png is shown. Its the dialog which is used when Location bar is hidden.

Possible cause (from #firefox@irc):
<Mossop> gavin__: Wierd thing. gURLBar is only set in delayedStartup if the homepage is about:blank

This bug does not appear if homepage is set to a valid URL.

Reproducible: Sometimes

Steps to Reproduce:
1. Set homepage to about:blank
2. Open new window with Ctrl+N
3. Quickly press Alt+D

Actual Results:  
If Alt+D is pressed while new window opens, the dialog appears.

Expected Results:  
Nothing. Focusing of the Location bar.
The problem here is that the code to focus the location bar requires that gURLBar be set, which is only set in prepareForStartup.

For whatever reason prepareForStartup is called in BrowserStartup() when a homepage is set, but in delayedStartup() when the homepage is about:blank.

prepareForStartup is put off in an attempt to speed up the window open when it doesnt appear to be needed just yet (taken from blame comment).

I guess moving the gURLBar assignment into BrowserStartup() is the obvious fix here.
This was suggested by gavin on IRC. Just try to retrieve the URL bar if its not already set.
Assignee: nobody → mossop.bugzilla
Status: NEW → ASSIGNED
Attachment #216841 - Flags: review?(mconnor)
Comment on attachment 216841 [details] [diff] [review]
Try to find url bar if its null

As you requested on IRC, should only take moments!
Attachment #216841 - Flags: review?(mconnor) → review?(bugs.mano)
Comment on attachment 216841 [details] [diff] [review]
Try to find url bar if its null

Minusing as the current hack around prepareForStartup isn't safe regardless of this patch; will you review a patch to clean this up, at least for trunk baking...
Attachment #216841 - Flags: review?(bugs.mano) → review-
Depends on: 338360
Assignee: mossop.bugzilla → nobody
Status: ASSIGNED → NEW
guys, hello?
this is a one-line fix and its EXTREMELY annoying.
still not fixed in 1.5.0.8
Severity: normal → major
negative.
I am running 1.5.0.8 and I can easily duplicate this bug.
hit ctrl+n, alt-d quickly in sequence.
"FIXED" in the context of bugzilla means "fixed on the trunk". This bug isn't, and won't be fixed on the 1.8.0 branch (Firefox 1.5.0.x). It could potentially be fixed for Firefox 2.0.0.x, but that's pretty unlikely. It will be fixed for Firefox 3.
Fixed by bug 338360 then
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.