'Recently Closed Tabs' menu item command in 'History' menu is disabled when shown for the first time despite tabs closed before - cannot reopen tabs
Categories
(Firefox :: Menus, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox127 | --- | unaffected |
| firefox128 | --- | unaffected |
| firefox129 | + | verified |
People
(Reporter: aryx, Assigned: tschuster, NeedInfo)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
Firefox 129.0a1 on Windows 10
The 'Recently Closed Tabs' menu item command in the 'History' menu is disabled when shown for the first time despite tabs closed before.
Steps to reproduce:
- Launch Firefox.
- Visit https://www.mozilla.org
- Open the links in the header.
- Close 2 tabs, e.g. by clicking on them with the middle mouse button/mouse wheel.
- Press the Alt key to show the menu bar.
- Open the 'History' menu.
Expected result:
'Recently Closed Tabs' menu enabled, provides a submenu to reopen closed tabs
Actual result:
'Recently Closed Tabs' menu disabled
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 1•1 year ago
•
|
||
So the problem is that the "disabled" state of the "Recently Closed Tabs" menu is set by HistoryMenu.toggleRecentlyClosedTabs, which is called by the HistoryMenu._onPopupShowing event listener, however that listener doesn't fire at all, because we just created the HistoryMenu object inside our own popupshowing event listener. Opening the menu bar a second time makes it work correctly, because the listener is already attached.
Is it really expected that this works with inline event handlers? i.e. do they always behave like addEventListener with {capture: true}?
Comment 3•1 year ago
|
||
(In reply to Tom Schuster (MoCo) from comment #1)
So the problem is that the "disabled" state of the "Recently Closed Tabs" menu is set by
HistoryMenu.toggleRecentlyClosedTabs, which is called by theHistoryMenu._onPopupShowingevent listener, however that listener doesn't fire at all, because we just created theHistoryMenuobject inside our ownpopupshowingevent listener. Opening the menu bar a second time makes it work correctly, because the listener is already attached.
I tried this out because it didn't make sense to me. A naive test suggests the order of events is normally capture->inline->bubble, but adding a capturing listener from inline doesn't fire - https://jsbin.com/xetacevexe/edit?html,js,output .
So I don't think this is accurate. Then I built beta (before the regressing patch landed) and set a breakpoint in popupshowing in the browser debugger. That showed me that the constructor in PlacesMenu calls _onPopupShowing manually - https://searchfox.org/mozilla-central/rev/74518d4f6979b088e28405ba7e6238f4707639cf/browser/components/places/content/browserPlacesViews.js#1991 .
We're still creating the HistoryMenu as we were before, and passing the event along - so why does that not work anymore?
Comment 4•1 year ago
|
||
(In reply to Najjar from comment #2)
This issue is also present on 127.0.1 in Linux
This doesn't make any sense because this bug is marked as a regression in 129. Please file a separate bug with more details about what you're seeing.
| Assignee | ||
Comment 5•1 year ago
|
||
I hadn't even considered that we could be manually calling the popupshowing event handler from the super constructor. The reason that is doesn't work anymore is this check:
// Don't handle events for submenus.
if (aEvent.target != aEvent.currentTarget) {
return;
}
currentTarget is always the <menubar id="main-menubar">.
| Assignee | ||
Comment 6•1 year ago
|
||
Comment 9•1 year ago
|
||
Set release status flags based on info from the regressing bug 1893068
Updated•1 year ago
|
Comment 10•1 year ago
|
||
Reproduced the issue on Nightly 129.0a1 Build ID: 20240618094855 on Windows 10.
Verified as fixed using Firefox 129.0b2 and Nightly 130.0a1 on Windows 10, Ubuntu 22.04 and macOS 13.
Description
•