+++ This bug was initially created as a clone of Bug #1763468 +++ STR - Select a message (important!) - Then select an event from Today Pane - Main menu: Check and try Edit > Delete* menuitem (#menu_delete) Actual result - With event from Today pane selected, #menu_delete still showing and doing `Delete Message` (and enabled if a message was previously selected) Expected result - With event from Today pane selected, #menu_delete should show and do `Delete Event` or `Delete Task` respectively; lacking that, `Delete Message` should at least be disabled. (In reply to Geoff Lankow (:darktrojan) (๐, ๐, ๐๏ธ etc. - back Jan 9) from bug 1763468, comment #4) > If you go to the Delete item on the Edit menu it will delete any selected message ([this code runs](https://searchfox.org/comm-central/rev/3280529a8a8f603cb9489fddc75ba8b320289522/mail/base/content/mail3PaneWindowCommands.js#762)) 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`](https://searchfox.org/comm-central/rev/3280529a8a8f603cb9489fddc75ba8b320289522/mail/base/content/mail3PaneWindowCommands.js#302) 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.
Bug 1809050 Comment 0 Edit History
Note: The actual edited comment in the bug view page will always show the original commenterโs name and original timestamp.
+++ This bug was initially created as a clone of Bug #1763468 +++ STR - Select a message (important!) - Then select an event or task from Today Pane - Main menu: Check and try Edit > Delete* menuitem (#menu_delete) Actual result - With event from Today pane selected, #menu_delete still showing and doing `Delete Message` (and enabled if a message was previously selected) Expected result - With event from Today pane selected, #menu_delete should show and do `Delete Event` or `Delete Task` respectively; lacking that, `Delete Message` should at least be disabled. (In reply to Geoff Lankow (:darktrojan) (๐, ๐, ๐๏ธ etc. - back Jan 9) from bug 1763468, comment #4) > If you go to the Delete item on the Edit menu it will delete any selected message ([this code runs](https://searchfox.org/comm-central/rev/3280529a8a8f603cb9489fddc75ba8b320289522/mail/base/content/mail3PaneWindowCommands.js#762)) 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`](https://searchfox.org/comm-central/rev/3280529a8a8f603cb9489fddc75ba8b320289522/mail/base/content/mail3PaneWindowCommands.js#302) 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.