Closed Bug 1902683 Opened 2 years ago Closed 2 years ago

Screenshot mode is not exited when Enter key is pressed on the focused Cancel button

Categories

(Firefox :: Screenshots, defect)

Desktop
All
defect

Tracking

()

VERIFIED FIXED
129 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox127 --- wontfix
firefox128 --- verified
firefox129 --- verified

People

(Reporter: sbadau, Assigned: niklas)

References

Details

Attachments

(1 file)

Found in

  • Firefox 128.0b2

Affected versions

  • Firefox 127
  • Firefox 128 Beta
  • Nightly 129.0a1

Tested platforms

  • Affected platforms: Ubuntu 22.04, macOS 13, Windows 10

Steps to reproduce

  1. Navigate to any website and enable Screenshots by pressing Ctrl/Cmd+Shift+S keys.
  2. Place the mouse somewhere on the Screenshot overlay.
  3. Use the Tab key to navigate to the Cancel button.
  4. Press the Enter key.

Expected result

  • Screenshot mode should be exited when the Enter Key is pressed while the Cancel button is in focus.

Actual result

  • Instead of exiting Screenshots mode, a new area is selected.
  • This behaviour is not encountered when pressing Space instead of Enter.

Regression range

  • The issue is present in all curent versions, not sure if it's a regression. I'll investigate more as soon as possible.
Assignee: nobody → nbaumgardner
Status: NEW → ASSIGNED
Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/805b6d6eda9f Early return on keydown when screenshots button is focused. r=sfoster
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch

The patch landed in nightly and beta is affected.
:niklas, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox128 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(nbaumgardner)

Comment on attachment 9407591 [details]
Bug 1902683 - Early return on keydown when screenshots button is focused. r=sfoster

Beta/Release Uplift Approval Request

  • User impact if declined: Using the "Enter" key on a button in screenshots does not work.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Steps to reproduce:
  1. Navigate to any website and enable Screenshots by pressing Ctrl/Cmd+Shift+S keys.
  2. Use the mouse to hover over an element on the page so the hover element region is visible.
  3. Use the Tab key to navigate to the Cancel button.
  4. Press the Enter key.

ER:
The screenshots UI will close

  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): This is pretty low risk. It only returns early if a key events happens on a button to prevent the bug from occurring.
  • String changes made/needed: No
  • Is Android affected?: No
Flags: needinfo?(nbaumgardner)
Attachment #9407591 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9407591 [details]
Bug 1902683 - Early return on keydown when screenshots button is focused. r=sfoster

Approved for 128.0b5.

Attachment #9407591 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: in-testsuite+

Verified as fixed using the latest Nightly 129.0a1 (Build ID: 20240618214224) on Ubuntu 22.04, macOS 13 and Windows 10.

Verified as fixed using the latest Firefox 128.0b5 on macOS 13, Ubuntu 22.04 and Windows 10.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: