Opening 'recent closed tabs' item with middle-click is broken

RESOLVED FIXED in Firefox 27

Status

()

defect
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: alice0775, Assigned: Gijs)

Tracking

({regression})

27 Branch
Firefox 27
x86_64
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox26 unaffected, firefox27+ fixed)

Details

(Whiteboard: [good first verify])

Attachments

(1 attachment)

Build Identifier:
http://hg.mozilla.org/mozilla-central/rev/e25e62d174ed
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 ID:20131019030204

Steps To Reproduce:
1. Close several tabs
2. History -> Recently close tabs -> mid-click on any 'recent closed tab'

Actual Results:
Nothing happens

Expected Results:
Should open in a 'new tab'


Regression window:
http://hg.mozilla.org/integration/fx-team/pushloghtml?fromchange=50abdc9ee405&tochange=1dd4cd4890fc
http://hg.mozilla.org/integration/fx-team/rev/082357277604#l2.63


    2.63 +        element.addEventListener("click", this._undoCloseMiddleClick, false);

Except there is no this._undoCloseMiddleClick.

This will also be broken on UX, I'd imagine.
Restore All Tabs is also broken 

> Error: undoCloseTab is not defined
> Source File: resource://app/modules/sessionstore/RecentlyClosedTabsAndWindowsMenuUtils.jsm
> Line: 70

getTabsFragment use addEventListener for "click" and "command" - undoCloseTab  and this._undoCloseMiddleClick are both not defined.

getWindowsFragment use "oncommand" and the reference for undoCloseWindow is in string that only use form browser window
This fixes things for me, and seems to make sense...
Attachment #819500 - Flags: review?(jaws)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
The patch from bug 927917 needs to be merged to m-c, and then this patch can build on top of that one.
(In reply to Jared Wein [:jaws] from comment #4)
> The patch from bug 927917 needs to be merged to m-c, and then this patch can
> build on top of that one.

This was completely incorrect, as the patch in that bug only touched UX-specific code.
Comment on attachment 819500 [details] [diff] [review]
middle click open recent tabs and restore all tabs broken,

Review of attachment 819500 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/sessionstore/src/RecentlyClosedTabsAndWindowsMenuUtils.jsm
@@ +133,5 @@
> +    * Used for a middle click.
> +    * @param aEvent
> +    *        The event when the user clicks the menu item
> +    */
> +  _undoCloseMiddleClick: function PHM__undoCloseMiddleClick(aEvent) {

PHM__ doesn't make any sense here. Since this is in a JSM, we can also remove the underscore prefix from the function name.
Attachment #819500 - Flags: review?(jaws) → review+
(In reply to Jared Wein [:jaws] from comment #6)
> Comment on attachment 819500 [details] [diff] [review]
> middle click open recent tabs and restore all tabs broken,
> 
> Review of attachment 819500 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> :::
> browser/components/sessionstore/src/RecentlyClosedTabsAndWindowsMenuUtils.jsm
> @@ +133,5 @@
> > +    * Used for a middle click.
> > +    * @param aEvent
> > +    *        The event when the user clicks the menu item
> > +    */
> > +  _undoCloseMiddleClick: function PHM__undoCloseMiddleClick(aEvent) {
> 
> PHM__ doesn't make any sense here. Since this is in a JSM, we can also
> remove the underscore prefix from the function name.

I've removed the function name, like the other functions in that object.

https://hg.mozilla.org/integration/fx-team/rev/f77442b18813
Whiteboard: [fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/f77442b18813
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 27
Keywords: verifyme
Whiteboard: [good first verify]
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.