[A11y][Keyboard Navigation]Cancelling a note via Keyboard Navigation still saves it
Categories
(Firefox :: Tabbed Browser, defect, P1)
Tracking
()
People
(Reporter: rpopovici, Assigned: itoro.ujames)
References
(Blocks 2 open bugs)
Details
(Keywords: good-next-bug, Whiteboard: [fidefe-tabgrps][outreachy-sidebar-2026])
Attachments
(1 file)
Note
- This issue is specific to keyboard navigation. Note is saved after cancellation.
Found in
- Nightly v149.0a1
Affected versions
- Nightly v149.0a1
Tested platforms
- Affected platforms: all
- Unaffected platforms: none
Steps to reproduce
- Load any webpage.
- Open the Add Note dialog by pressing Shift+ F10(CMD+Return for macOS 15).
- Insert any string in the text box.
- Move focus to the Cancel button using the keyboard navigation and press Enter.
Expected result
- The Add note dialog is dismissed, and the note should be cancelled.
Actual result
- The Add note dialog is dismissed and the note is saved after cancellation.
Regression range
- Not a regression.
Comment 1•7 months ago
|
||
Thank you for the report. We have yet to formally work on keyboard controls for this panel. That work is tracked as bug 2009262.
I think we should make sure that any patch for bug 2009262 fixes this, though, so I'd like to keep this open.
This behavior is very confusing, though, so I'm raising to P1.
Updated•7 months ago
|
Comment 2•6 months ago
|
||
Currently, when the user presses "Enter" anywhere in the panel, we are saving the tab note. https://searchfox.org/firefox-main/rev/1427c88632d1474d2653928745d78feca1a64ee0/browser/components/tabbrowser/content/tabnote-menu.js#135-139
We should only save the tab note if:
- the user clicks the "Save" button
- the user activates the "Save" button via keyboard
- the user presses the Enter key while the focus is inside of the note text textarea
We should not save the tab note if:
- the user presses the Escape key in any context
- the user clicks the "Cancel" button
- the user activates the "Cancel" button via keyboard
The tests in https://searchfox.org/firefox-main/source/browser/components/tabnotes/test/browser/browser_tab_notes_menu.js should be updated to test each case to make sure that the tab note is only saved when it's expected.
Comment 3•6 months ago
|
||
Note: to test this feature, you need to enable browser.tabs.notes.enabled in about:config in order to display the "Add Note" menu item when right-clicking a tab.
Updated•6 months ago
|
Updated•6 months ago
|
| Assignee | ||
Comment 5•6 months ago
|
||
| Assignee | ||
Comment 6•6 months ago
|
||
Link to Patch: https://phabricator.services.mozilla.com/D290019
Comment 9•6 months ago
|
||
Backed out for causing bc and TV failures at tab_notes_menu.js
Backout Link
Push with failures
Failure Log bc
Failure log TV
Failure line TEST-UNEXPECTED-FAIL | browser/components/tabnotes/test/browser/browser_tab_notes_menu.js | test_keyboardNavigationSaveCancel - Test timed out
Comment 10•5 months ago
|
||
Comment 11•5 months ago
|
||
Comment 12•5 months ago
|
||
Backed out for causing bc and TV failures at browser_tab_notes_telemetry.js
Backout Link
Push with failures
Failure Log bc
Failure log TV
Failure line TEST-UNEXPECTED-FAIL | browser/components/tabnotes/test/browser/browser_tab_notes_telemetry.js | test_tabNoteAddedTabContextMenu - added event extra data should include length and say the tab note was added from the tab context menu - {"source":"context_menu","note_length":"9"} deepEqual {"source":"context_menu","note_length":17}
Comment 13•5 months ago
|
||
Comment 14•5 months ago
|
||
| bugherder | ||
Comment 15•5 months ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Updated•5 months ago
|
Comment 16•5 months ago
|
||
Authored by https://github.com/CelineJames
https://github.com/mozilla/enterprise-firefox/commit/a6e5208b3bc669409b84469a2ce7bdeba323ffb4
[enterprise-main] Bug 2015491 - Only save tab note when Enter is pressed inside the textarea or when save button is focused r=kcochrane,sthompson,tabbrowser-reviewers
Comment 17•5 months ago
|
||
The patch landed in nightly and beta is affected.
:itoro.ujames, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox150towontfix.
For more information, please visit BugBot documentation.
Updated•5 months ago
|
Updated•5 months ago
|
Updated•5 months ago
|
Description
•