Closed Bug 1647059 Opened 4 years ago Closed 4 years ago

Reopen closed window shortcut not immediately active

Categories

(Firefox :: Menus, defect)

77 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 492320

People

(Reporter: andy.d, Unassigned)

References

Details

(Keywords: steps-wanted)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:77.0) Gecko/20100101 Firefox/77.0

Steps to reproduce:

I often want to use the "reopen last closed window" shortcut (Cmd-Shift-N). Most of the time, I press the shortcut, and nothing happens.

In order to make it work, I need to manually open the menubar > History > Recently Closed Windows. Once that list of previous windows is visible, I can use the shortcut and it works. It then continues to work for a while (I'm not sure how long).

Before opening that menu item, the shortcut does not work.

With that said, I can't reliably reproduce it. Once the shortcut has been "activated", it continues to work for a while. I haven't yet been able to figure out what event "deactivates" it. When deactivated, the shortcut doesn't do anything else, so I don't think it's being overridden by an extension.

I couldn't reproduce this issue i tried on MacOS 10.14 and on MacOS 10.15 on the latest Firefox Nightly and on the latest Firefox release. Every time i use (Cmd-Shift-N) shortcut it reopen the closed window.

Assigning "Firefox: Keyboard Navigation" component.

Component: Untriaged → Keyboard Navigation
Component: Keyboard Navigation → General
Keywords: steps-wanted
Component: General → Menus

Without steps or being able to reproduce, there isn't a lot we can do about this...

When you use the shortcut and it doesn't do anything, do any errors appear in the browser console? (cmd-shift-j to open -- note: NOT the same as the regular developer tools console).

Flags: needinfo?(andy.d)

See screenshot of the browser console: https://i.ibb.co/kmMgKfn/Screenshot-2020-07-20-at-16-01-35.png

I also noticed that this happens when I don't have a Firefox window open. When I open one, I can cmd-shift-N fine. When I close it, it stops working.

Flags: needinfo?(andy.d)

(In reply to Andy from comment #4)

See screenshot of the browser console: https://i.ibb.co/kmMgKfn/Screenshot-2020-07-20-at-16-01-35.png

I also noticed that this happens when I don't have a Firefox window open. When I open one, I can cmd-shift-N fine. When I close it, it stops working.

The errors here seem mostly related to add-ons code. I can reproduce the issue when there's no windows open without add-ons, so they seem unrelated - but they might still be something we should fix. Luca, can you take a look at the screenshot and file a webextension issue if you think there's something the API layer could/should be doing here (as opposed to it just being related to a particular extension) ?

Meanwhile I'll see if I can find a regression window for the no-windows-no-undo-close-window bug.

Flags: needinfo?(lgreco)

(In reply to :Gijs (he/him) from comment #5)

Meanwhile I'll see if I can find a regression window for the no-windows-no-undo-close-window bug.

Well, that was brief - it does not appear to have worked in a 2017-01-01 build, annnnd I found bug 492320. So apparently this has... never worked?

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE

(In reply to :Gijs (he/him) from comment #5)

(In reply to Andy from comment #4)

See screenshot of the browser console: https://i.ibb.co/kmMgKfn/Screenshot-2020-07-20-at-16-01-35.png

I also noticed that this happens when I don't have a Firefox window open. When I open one, I can cmd-shift-N fine. When I close it, it stops working.

The errors here seem mostly related to add-ons code. I can reproduce the issue when there's no windows open without add-ons, so they seem unrelated - but they might still be something we should fix. Luca, can you take a look at the screenshot and file a webextension issue if you think there's something the API layer could/should be doing here (as opposed to it just being related to a particular extension) ?

Thanks for pointing this out to us, it does look like a legit bug from a WebExtensions API perspective (even if actually unrelated to this issue).

It seems that Services.wm.getMostRecentWindow and Services.wm.getMostRecentNonPBWindow have different behaviors when no window is open (which I think it can only actually happen on macOS where Firefox is still alive even after the last Firefox window is closed), I filed Bug 1654243 to track the WebExtensions API issue.

Flags: needinfo?(lgreco)
You need to log in before you can comment on or make changes to this bug.