Closed Bug 1735122 Opened 3 years ago Closed 3 years ago

"Forget About This Site" confirmation prompt is still clearing when cancelled with the Esc key

Categories

(Toolkit :: Data Sanitization, defect)

Firefox 93
defect

Tracking

()

VERIFIED FIXED
95 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox93 --- wontfix
firefox94 + verified
firefox95 --- verified

People

(Reporter: ke5trel, Assigned: pbz)

References

Details

Attachments

(1 file)

STR:

  1. Login to a site and save the password.
  2. Right-click a history item for the site (sidebar, library or menu) and choose "Forget About This Site".
  3. When the confirmation prompt appears, press the Esc key.

Expected:

Esc cancels the prompt and nothing is cleared.

Actual:

History, cookies and passwords are cleared for the site.

Clicking the Cancel button or pressing Enter/Spacebar with the Cancel button focused works as expected.

Assignee: nobody → pbz
Status: NEW → ASSIGNED

I can reproduce this. The issue is that "esc" will result in button1 which is used as "accept" here. Switching the buttons should fix this.

Pressing the X (close window button on Windows) also clears the data.
Is this case taken care of in the patch? (Sorry I don't know how to read the codes.)

(In reply to Fanolian from comment #3)

Pressing the X (close window button on Windows) also clears the data.
Is this case taken care of in the patch? (Sorry I don't know how to read the codes.)

Yes, the patch also addresses this issue. Thanks for pointing it out!

[Tracking Requested - why for this release]: Causes unintended dataloss if the user opens the dialog and tries to exit without using the "Cancel" button.

Pushed by pzuhlcke@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/50698f4ed7ec
Fix esc key accepting the 'forget about this site' confirmation prompt. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

The patch landed in nightly and beta is affected.
:pbz, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(pbz)

Comment on attachment 9245259 [details]
Bug 1735122 - Fix esc key accepting the 'forget about this site' confirmation prompt. r=standard8!

Beta/Release Uplift Approval Request

  • User impact if declined: Firefox may clear site data unexpectedly, if users cancel the "Forget about this site" confirmation prompt via "ESC" key or by closing the prompt window.
    (Note that prior to FF 93 the "Forget about this site" feature didn't have a confirmation dialog at all and would directly clear data)
  • 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: See STR in comment 0.
    You can additionally test with the window close button, instead of using the ESC key. It should result in the same behavior and not confirm the prompt / clear site data.
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Low risk. The code change is very small and well understood. Is covered by automated tests.
  • String changes made/needed:
Flags: needinfo?(pbz)
Attachment #9245259 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Comment on attachment 9245259 [details]
Bug 1735122 - Fix esc key accepting the 'forget about this site' confirmation prompt. r=standard8!

Fixes a possible dataloss issue. Thanks for including new tests for this. Approved for 94.0b8.

Attachment #9245259 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Reproduced the issue with Firefox 95.0a1 (20211011214613) on Windows 10x64 and STR from comment 0.
Verified fixed with Firefox 95.0a1 (20211020093007) and 94.0b8 (20211019190240) on Windows 10x64, macOS 10.15 and Ubuntu 18.04. Clicking X or pressing Esc while the forget about this website prompt appears closes the window as expected and no longer confirms it.

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: