Add tests for opening context menus from the tabs in the new sidebar panels
Categories
(Firefox :: Sidebar, task, P3)
Tracking
()
People
(Reporter: kcochrane, Assigned: smag.vav, Mentored)
References
Details
(Keywords: good-first-bug, Whiteboard: [fidefe-sidebar][outreachy-sidebar-2026])
Attachments
(1 file, 1 external file, 1 obsolete file)
|
2.33 KB,
text/plain
|
Details |
Adding this as a follow-up to bug 1924126. It seems that simulating Shift+F10 in a test wasn't triggering the context menu for some reason. We should investigate why that is and add tests for this at a later time.
| Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•1 year ago
|
| Reporter | ||
Updated•7 months ago
|
| Reporter | ||
Updated•7 months ago
|
Hi, I left a comment on Phab a while ago, could you please check it?
| Reporter | ||
Updated•7 months ago
|
Updated•7 months ago
|
Comment 4•4 months ago
|
||
This good-first-bug hasn't had any activity for 2 months, it is automatically unassigned.
For more information, please visit BugBot documentation.
Comment 5•4 months ago
|
||
Hi! I’m an Outreachy applicant for the Dec 2026 - Mar 2027 round.
I’d like to work on this mentored bug.
Could the mentor please point me to the existing sidebar context menu code and where to add the new tests?
Thanks!
| Assignee | ||
Comment 6•2 months ago
|
||
| Assignee | ||
Comment 7•2 months ago
|
||
I added a new test test_keyboard_context_menu to verify opening the sidebar context menu via Shift+F10.
The test includes an explicit focusability check, which passes:
PASS test_keyboard_context_menu - sidebarMain has focus after explicit focus()
PASS test_keyboard_context_menu - sidebarMain is actually focusable in test environment
So in the automated test environment sidebarMain can be focused programmatically.
However, after simulating EventUtils.synthesizeKey("KEY_F10", { shiftKey: true }), the sidebar-contextmenu-ready event never arrives, and the test times out:
FAIL test_keyboard_context_menu - Test timed out
When testing manually in Firefox, the sidebar itself cannot be focused (only buttons inside it can be focused). Pressing Shift+F10 opens the page context menu, not the sidebar menu.
It’s possible that I am not calling the event correctly — if so, please correct me. Otherwise, this looks like a limitation or bug in Firefox code: the sidebar is not a focusable element for keyboard context menus.
| Assignee | ||
Updated•2 months ago
|
Comment 8•2 months ago
|
||
Hi Ivan, thanks for working on this and apologies for the delay. Here are some steps to get your code in review so I can provide feedback:
- Download and build the Firefox source code
- If you have any problems, please ask on
Element/Matrix
in the#introductionchannel. They're there to help you get started. - You can also read the
Firefox Contributors' Quick Reference,
which has answers to most development questions.
- If you have any problems, please ask on
- Start working on this bug - you've already done this part!
- If you have any problems with this bug,
please comment on this bug and set the needinfo flag for me.
Also, you can find me and my teammates on the#sidebarchannel on
Element/Matrix
Monday to Friday.
- If you have any problems with this bug,
- Build your change with
mach buildand test your change with
mach test toolkit/components/telemetry/tests/.
Also check your changes for adherence to our style guidelines by usingmach lint - Submit the patch for review using Phabricator.
Mark me as a reviewer (nsharpley) so I'll get an email to come look at your code.- Getting your code reviewed
- This is when the bug will be assigned to you.
- After a series of reviews and changes to your patch,
I'll mark it for checkin or push it to autoland.
Your code will soon be shipping to Firefox users worldwide!
| Assignee | ||
Comment 9•2 months ago
|
||
Added test_keyboard_context_menu to browser_sidebar_context_menu.js to verify
that the sidebar context menu can be opened with Shift+F10.
The test currently fails with a timeout because the 'sidebar-contextmenu-ready'
event never fires after EventUtils.synthesizeKey(F10, { shiftKey: true }).
Manual verification confirms that the sidebar itself cannot be focused and
Shift+F10 opens the page context menu instead of the sidebar menu.
This is submitted for review to determine whether sidebar-main.mjs should be
modified to add keyboard support (similar to the fix in bug 1924126 for
sidebar-tab-row), or whether the test should be adjusted.
Updated•2 months ago
|
Updated•1 month ago
|
Comment 10•1 month ago
|
||
This bug was filed as a follow up to https://bugzilla.mozilla.org/show_bug.cgi?id=1924126 which adds the shift + F10 keyboard shortcut to open the context menu on a tab in the sidebar panel. If you open the history panel, for example, then tab/arrow to reach a tab and press shift + F10 it opens the context menu. This is what this bug is intending to test.
Description
•