Closed Bug 1763468 Opened 2 years ago Closed 1 year ago

Deleting an event from Today Pane with `Backspace` key deletes selected message(s) instead [Mac only]

Categories

(Calendar :: Calendar Frontend, defect, P2)

Thunderbird 101

Tracking

(thunderbird_esr102+ fixed, thunderbird102 affected, thunderbird108 affected, thunderbird109? fixed)

VERIFIED FIXED
110 Branch
Tracking Status
thunderbird_esr102 + fixed
thunderbird102 --- affected
thunderbird108 --- affected
thunderbird109 ? fixed

People

(Reporter: ryan, Assigned: thomas8)

References

Details

(Keywords: dataloss, regression, ux-error-prevention, Whiteboard: [STR Mac-only, but wrong menu state on all OS])

Attachments

(1 file)

Clicked on an event in the Today Pane to delete it and when I hit the delete key on the keyboard it deleted the email I had focused.

Expectation: Assumed the last item I clicked on (and was highlighted) would be the one my keyboard commands were interacting with.

What happened: I ended up deleting a couple email messages before I realized I wasn't interacting with the element I had selected (an event in the today pane).

This does not occur on the 91 branch, haven't tested betas.

Assignee: nobody → leftmostcat

Maybe less problematic, but essentially the same problem in the main calendar - no focus or keyboard access at all - see my bug 1717363.

See Also: → 1717363

The Today Pane doesn't display a selection unless it has focus (although if the calendar colour is similar to the selection colour it can be confusing), and if it does then pressing delete appears to do what it should.

If you go to the Delete item on the Edit menu that deletes any selected message (this code runs) even if the Today Pane has focus, which is bad. I guess if the keyboard event was somehow making it to that command the same thing would happen.

I think the simplest thing to do would be to check what has focus in the corresponding isCommandEnabled function and say if it's not inside the mail UI, return false.

Unfortunately the delete command in particular is a complete mess because it does something different in every context. It should be clearer once we've rebuilt the mail tabs.

First fast test on a local, editable calendar this was wfm on 101.0a1 (2022-04-06) (64-bit), Win 10.
Although exactly for the reasons mentioned by Geoff's comment 4, I'm inclined to believe that this can really happen.

Severity: -- → S2
Priority: -- → P2
Summary: Interacting with the Today Pane via Keyboard → Interacting with the Today Pane via Keyboard - Deleting an event with `Del` key deletes selected message(s) instead

Ryan said that this happened to him on a Mac - has someone tested this on Mac?

Antony, can you test this?

Flags: needinfo?(acdp)
Keywords: dataloss

(In reply to Wayne Mery (:wsmwk) from comment #7)

Antony, can you test this?

When Task pane is open along side the message pane, even though I have selected a task, scrolled up and down to ensure focus in Task Pane, then delete a selected Task - the email highlighted in the message pane is acutally deleted, NOT the selcted Task, as noted above

using TB 102.0b2
on macOS 11.6.7 release 20g710 en-UK

Have relicated the bug

Will delete the selected task using the mouse and pop-up menu

Flags: needinfo?(acdp)

Both Reporter (comment 0) and reproducer (comment 8) are on Mac, and I'm still unable to reproduce on Windows, 102.0b2 (64-bit) & 103.0a1 (2022-06-05) (64-bit), so the bug per STR of comment 0 is probably Mac only. However, the state of Edit > Delete Message (enabled even though event has focus) is error-prone on all OS per comment 4.

Status: NEW → ASSIGNED
Summary: Interacting with the Today Pane via Keyboard - Deleting an event with `Del` key deletes selected message(s) instead → Deleting an event from Today Pane with `Del` key deletes selected message(s) instead [Mac; wrong Edit menu command state on all OS]
Whiteboard: [STR Mac-only, but wrong menu state on all OS]

^^ About time to get this fixed: Here's a fast fix for the worst part of this. Deleting random messages when you just want to delete an event from your agenda is dataloss (hence marked by me as P2/S2), and as Ryan pointed out in comment 0, you may not even notice what's going on, but your messages will just disappear (to the bin, but that may not help), then we get mysterious bug reports on missing messages. Let's fix this asap for 102.

We can fix the menu in a followup bug, as the menu caption is actually correct and does what it says (delete message), although it should say and do something else (delete the selected event(s)).

Assignee: leftmostcat → bugzilla2007
Summary: Deleting an event from Today Pane with `Del` key deletes selected message(s) instead [Mac; wrong Edit menu command state on all OS] → Deleting an event from Today Pane with `Backspace` key deletes selected message(s) instead [Mac; wrong Edit menu command state on all OS]
Target Milestone: --- → 110 Branch

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/526d17e1c0cc
Handle Backspace on selected events in Today Pane to prevent unwanted message deletion on Mac. r=leftmostcat

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/1fb49ace1005
follow-up lint fix. rs=bustage-fix DONTBUILD
Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/b0ff2773a3dd
follow-up comment fix. rs=me DONTBUILD

Verified fixed on Daily 110.0a1 (2023-01-07) (64-bit), macOS Monterey 12.6.

Status: RESOLVED → VERIFIED

Comment on attachment 9307915 [details]
Bug 1763468 - Handle Backspace on selected events in Today Pane to prevent unwanted message deletion on Mac. r=leftmostcat

This causes covert dataloss of messages and should be uplifted to Beta and ESR asap.

[Approval Request Comment]
Regression caused by (bug #): n/a
User impact if declined: Dataloss - On macOS, deleting an event from Today Pane with Backspace key deletes selected message(s) instead
Testing completed (on c-c, etc.): yes, on c-c
Risk to taking this patch (and alternatives if risky): zero

Attachment #9307915 - Flags: approval-comm-esr102?
Attachment #9307915 - Flags: approval-comm-beta?
See Also: → 1809050

(In reply to Thomas D. (:thomas8) from comment #11)

We can fix the menu in a followup bug, as the menu caption is actually correct and does what it says (delete message), although it should say and do something else (delete the selected event(s)/task(s)).

I've filed this as Bug 1809050.

Summary: Deleting an event from Today Pane with `Backspace` key deletes selected message(s) instead [Mac; wrong Edit menu command state on all OS] → Deleting an event from Today Pane with `Backspace` key deletes selected message(s) instead [Mac only]

Comment on attachment 9307915 [details]
Bug 1763468 - Handle Backspace on selected events in Today Pane to prevent unwanted message deletion on Mac. r=leftmostcat

[Triage Comment]
Approved for beta

Attachment #9307915 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9307915 [details]
Bug 1763468 - Handle Backspace on selected events in Today Pane to prevent unwanted message deletion on Mac. r=leftmostcat

[Triage Comment]
approved for esr102 (even though it's not been on beta long, it's simple and not a nice behavior for Mac)

Attachment #9307915 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: