Closed Bug 1479448 Opened 6 years ago Closed 6 years ago

Cutting event in calendar view using ctrl+x triggers cutting even if cmd_cut is not enabled

Categories

(Calendar :: Calendar Frontend, defect)

Lightning 5.4.8
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
6.2.2.1

People

(Reporter: MakeMyDay, Assigned: MakeMyDay)

Details

Attachments

(1 file)

STR:
1. switch to calendar view and have at least one event in view
2. make the calendar the event is stored in read-only
3. select the event in the view
4. right click on the event to verify the context menu option |cut| is disabled
5. close the context menu
6. press ctrl+x to cut the event

Observed:
The cut operation is triggered.

Expected:
No operation will be triggerd at all, since the respective command cmd_cut is effectively disabled.

This is already an issue in ESR52 but gets more obvious in ESR60 if you try to cut a recurring event, since you now get prompted on whether you want to cut the occurrence or series.

A bandaid would be to check for whether aCommand is really enabled at [1], but we should find the root cause. Maybe other command are affected as well.

[1] https://searchfox.org/comm-central/source/calendar/base/content/calendar-common-sets.js#719
Interestingly, the mail code seems to suffer from the same issue in some circumstances since its bails out explicitely in doCommand of the FolderPaneController also referring to cmd_cut. [1]

So the attached patch follows that very approach.

[1] https://searchfox.org/comm-central/source/mail/base/content/mail3PaneWindowCommands.js#74
Assignee: nobody → makemyday
Status: NEW → ASSIGNED
Attachment #8997590 - Flags: review?(philipp)
Attachment #8997590 - Flags: approval-calendar-esr?(philipp)
Attachment #8997590 - Flags: approval-calendar-beta?(philipp)
Attachment #8997590 - Flags: review?(philipp)
Attachment #8997590 - Flags: review+
Attachment #8997590 - Flags: approval-calendar-esr?(philipp)
Attachment #8997590 - Flags: approval-calendar-esr+
Attachment #8997590 - Flags: approval-calendar-beta?(philipp)
Attachment #8997590 - Flags: approval-calendar-beta+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/dccaf0add9e3
Avoid unintended command excecution if command is not enabled. r=philipp
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 6.5
Attachment #8997590 - Flags: approval-calendar-beta+
Target Milestone: 6.2 → 6.2.1
Target Milestone: 6.2.1 → 6.2.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: