Closed
Bug 403162
Opened 18 years ago
Closed 18 years ago
[FIX]"Error: this._handleClick is not a function" closing Firefox tabs by clicking close button
Categories
(Core :: XBL, defect, P3)
Core
XBL
Tracking
()
VERIFIED
FIXED
mozilla1.9beta2
People
(Reporter: philor, Assigned: bzbarsky)
References
Details
(Keywords: regression)
Attachments
(3 files)
1.07 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
7.71 KB,
patch
|
Details | Diff | Splinter Review | |
7.06 KB,
patch
|
sicking
:
review+
sicking
:
superreview+
|
Details | Diff | Splinter Review |
Error: this._handleClick is not a function
Source File: chrome://global/content/bindings/button.xml
Line: 140
STR:
1. In a new profile (which should mean you have two tabs open, firstrun and default home page), go to about:config in one tab, and toggle javascript.options.showInConsole to true
2. Open the error console
3. Close the other tab by clicking the close button on the tab
Regression from bug 282180, which may have baked in SeaMonkey for 3 years, but apparently didn't consider things like http://mxr.mozilla.org/mozilla/source/browser/base/content/tabbrowser.xml#3010 (which I'm just guessing is the difference, and thus the source of the problem).
So far, I haven't spotted any overt problems from the error, but then I never was very good at reproducing the "double-click closes and opens" bug that the close-button handler hacks around.
Flags: blocking1.9?
Comment 1•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b2pre) Gecko/2007110905 Minefield/3.0b2pre] (nightly) (W2Ksp4)
Bug confirmed, per steps.
Oddly, if I use '-jsconsole' instead of step 2, I need to restart FireFox to get the error :-/
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Comment 2•18 years ago
|
||
I'm not sure whether this is a core bug, but I've written a workaround.
Basically tabbrowser-close-tab-button removes its binding parent from the DOM when it's clicked. This then tears down all its XBL methods. However its base binding's click handler still fires, and gets upset for obvious reasons.
Comment 3•18 years ago
|
||
Comment 4•18 years ago
|
||
Comment on attachment 288144 [details] [diff] [review]
Don't bother inheriting the binding
r=mano.
Attachment #288144 -
Flags: review?(mano) → review+
![]() |
Assignee | |
Comment 5•18 years ago
|
||
So really, we shouldn't be firing the event handler here, right? That would make the most sense to me.
![]() |
Assignee | |
Comment 6•18 years ago
|
||
So just undo what InstallEventHandlers does, I would think.
We have nsXBLBinding::UnhookEventHandlers, but it doesn't seem to be call everywhere where needed.
![]() |
Assignee | |
Comment 8•18 years ago
|
||
Does this fix it too? The steps to reproduce don't reproduce for me, even without this patch....
![]() |
Assignee | |
Comment 9•18 years ago
|
||
Reporter | ||
Comment 10•18 years ago
|
||
Comment on attachment 288249 [details] [diff] [review]
Possible core patch
Yep, that fixes it for me.
![]() |
Assignee | |
Comment 11•18 years ago
|
||
Neil, you ok if I move this to Core and take it, or should I file a separate bug on the core change?
Comment 12•18 years ago
|
||
(In reply to comment #11)
>Neil, you ok if I move this to Core and take it, or should I file a separate
>bug on the core change?
If I'm not going to need my patch then feel free to move this to Core.
![]() |
Assignee | |
Updated•18 years ago
|
Assignee: neil → nobody
Status: ASSIGNED → NEW
Component: XUL Widgets → XBL
Product: Toolkit → Core
QA Contact: xul.widgets → xbl
Summary: "Error: this._handleClick is not a function" closing Firefox tabs by clicking close button → [FIX]"Error: this._handleClick is not a function" closing Firefox tabs by clicking close button
Target Milestone: --- → mozilla1.9 M10
![]() |
Assignee | |
Updated•18 years ago
|
Assignee: nobody → bzbarsky
![]() |
Assignee | |
Comment 13•18 years ago
|
||
Comment on attachment 288250 [details] [diff] [review]
Same as diff -w
This makes unhooking mirror hookup more closely, and calls it when we tear down style bindings.
Attachment #288250 -
Flags: superreview?(jonas)
Attachment #288250 -
Flags: review?(jonas)
Comment on attachment 288250 [details] [diff] [review]
Same as diff -w
Does it really matter if we use target->RemoveGroupedEventListener or manager->RemoveEventListenerByType? I agree it's good to make install and unhook be similar so the change seems good. I'm mostly curious.
Attachment #288250 -
Flags: superreview?(jonas)
Attachment #288250 -
Flags: superreview+
Attachment #288250 -
Flags: review?(jonas)
Attachment #288250 -
Flags: review+
![]() |
Assignee | |
Comment 15•18 years ago
|
||
> Does it really matter if we use target->RemoveGroupedEventListener or
> manager->RemoveEventListenerByType?
I have no idea! So I figured I'd play it safe. Maybe we should remove some of these APIs.... ;)
Checked the patch in. Working on tests.
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Comment 17•18 years ago
|
||
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9b2pre) Gecko/2007111605 Minefield/3.0b2pre] (nightly) (W2Ksp4)
V.Fixed.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•