Closed Bug 273200 Opened 20 years ago Closed 20 years ago

Ctrl+W in Find bar breaks middle-clicking links, find toolbar, and back button

Categories

(Toolkit :: Find Toolbar, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8final

People

(Reporter: jruderman, Assigned: amotohiko_mozillafirebird)

References

Details

(Keywords: regression)

Attachments

(1 file)

This happened to me once while I was using Mozilla/5.0 (Windows; U; Windows NT
5.1; en-US; rv:1.8a6) Gecko/20041203 Firefox/1.0+.  A bunch of stuff broke at
once in one window.  Other windows continued to work.

* Middle-clicking links stopped opening them in new tabs, and this error
appeared when I middle-clicked links:

Error: window._content has no properties

Source File: chrome://browser/content/contentAreaUtils.js

Line: 31

* The Find toolbar stopped finding, and this error appeared on every keypress
when I typed into it:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDOMXULElement.boxObject]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://global/content/bindings/browser.xml :: get_docShell :: line 0"  data: no]

* The back button stopped working -- it remained disabled through page loads.
This has happened to me several times since I reported it.
Summary: Middle-clicking links, find toolbar, and back button all break in a window (unable to reproduce) → Middle-clicking links, find toolbar, and back button all break in a window (randomly)
Version: 1.0 Branch → Trunk
This doesn't seem to be an aviary-landing bug.
Still happening in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6)
Gecko/20050107 Firefox/1.0+.
This just happened to me in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8b) Gecko/20050115 Firefox/1.0+. The Go menu was also broken (showing only
back, forward, home, history), and using the find toolbar gave this error:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004002 (NS_NOINTERFACE) [nsIInterfaceRequestor.getInterface]"  nsresult:
"0x80004002 (NS_NOINTERFACE)"  location: "JS frame ::
chrome://global/content/findBar.js :: getSelectionControllerForFindToolbar ::
line 209"  data: no]

However, the problem seemed to "fix itself", I think it was when I looked at the
History sidebar.
This is happening to me very frequently, usually right after I close a tab. 
Switching tabs fixes it.
Flags: blocking-aviary1.1?
I finally figured out how to reproduce this bug!  I don't know whether this is
the only way to break _content.

1. Make sure you have at least two tabs open.
2. Open the Find bar.
3. While the Find bar has focus, press Ctrl+W or Ctrl+F4.

Result: The tab closes as expected, but the following appears on the JS console:

Error: uncaught exception: [Exception... "Component returned failure code:
0x80004005 (NS_ERROR_FAILURE) [nsIDOMXULElement.boxObject]"  nsresult:
"0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame ::
chrome://global/content/bindings/browser.xml :: get_docShell :: line 0"  data: no]

4. Try to middle-click links in the tab that is now selected.

Result: Nothing happens, and the following error appears on the JS console:

Error: window._content has no properties
Source File: chrome://browser/content/contentAreaUtils.js
Line: 31

Workaround: switch tabs (open a new tab using Ctrl+T if necessary).
Summary: Middle-clicking links, find toolbar, and back button all break in a window (randomly) → Ctrl+W in Find bar breaks middle-clicking links, find toolbar, and back button
Component: General → Find Toolbar / FastFind
QA Contact: general
Jesse, does the patch from bug 278544 help?
Depends on: 278544
Should be fixed in the next build, please test (bug 278544).
I still see this bug in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.8b2) Gecko/20050303 Firefox/1.0+.
Still happens in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2)
Gecko/20050305 Firefox/1.0+, even though bug 274625 has been fixed as well.
Flags: blocking-aviary1.1? → blocking-aviary1.1+
Attached patch Simple patch.Splinter Review
The error in browser.xml occurs in onblur event of findbar.
http://lxr.mozilla.org/mozilla/source/toolkit/components/typeaheadfind/content/findBar.inc#8


I don't know exactly, but this might be caused by reference to contents of
closed tab.
http://lxr.mozilla.org/mozilla/source/toolkit/components/typeaheadfind/content/findBar.js#263

# ??? destroy current tab -> focus new tab -> onblur -> refer to destroyed tab
-> error ???

There are nothing to be changed its styles, so make quickly return from
changeSelectionColor().
Comment on attachment 177698 [details] [diff] [review]
Simple patch.

Does anyone take a look at this?
Attachment #177698 - Flags: review?
Attachment #177698 - Flags: review? → review?(mconnor)
*** Bug 282961 has been marked as a duplicate of this bug. ***
Comment on attachment 177698 [details] [diff] [review]
Simple patch.

r=me, with the following comment instead, since this won't always be in tabs:

// if we throw here, the browser we were in is already destroyed.
// see bug 273200
Attachment #177698 - Flags: review?(mconnor) → review+
Attachment #177698 - Flags: approval-aviary1.1a1?
Comment on attachment 177698 [details] [diff] [review]
Simple patch.

a=shaver, with the comment fixed as mconnor requested.
Attachment #177698 - Flags: approval-aviary1.1a1? → approval-aviary1.1a1+
Assignee: firefox → amotohiko_mozillafirebird
Severity: major → normal
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [checkin needed]
Target Milestone: --- → Firefox1.1
Checking in mozilla/toolkit/components/typeaheadfind/content/findBar.js;
/cvsroot/mozilla/toolkit/components/typeaheadfind/content/findBar.js,v  <-- 
findBar.js
new revision: 1.7; previous revision: 1.6
done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Whiteboard: [checkin needed]
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: