Closed Bug 320175 Opened 14 years ago Closed 14 years ago

can't delete event from keyboard in new month view

Categories

(Calendar :: Internal Components, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmose, Assigned: michael.buettner)

References

Details

(Whiteboard: [good first bug])

Attachments

(1 file)

The delete key doesn't do it.
See http://lxr.mozilla.org/mozilla/source/calendar/base/content/calendar-multiday-view.xml#2264 for a helpful example.
Whiteboard: [good first bug]
The example I gave in comment #1 is irrelevant.  The code for this is already in calendar-month-view, but isn't being called for some reason. http://lxr.mozilla.org/mozilla/source/calendar/base/content/calendar-month-view.xml#1114
I tried this bug today (Sunbird 0.3a1+ (20060110)) and noticed some strange things.

I added a dump to the keypress handler of the calendar-month-view and calendar-multiday-view bindings to see when it's called.

1) In day/week view the event handler is called and the event
   can be deleted with delete and backspace key.

2) In multiweek/month view the event handler is NOT called. BUT the event
   is deleted when using the delete key. Backspace key does not work.
   
   From a first look I could not identify who is deleting the event.


3) If you go to day/week view and click in the view and then press a key
   calendar-multiday-view keypress handler is called.
   But if you now go to multiweek/month view and click in the view and then
   press a key the calendar-multiday-view keypress handler is called too! 
   Not the calendar-month-view keypress handler as I would expect.
   
   If you select an event in the multiweek/month view, then switch to day/week
   view (without clicking in the view) and press a key none of the both event
   handlers is called. But pressing the delete key still deletes the event as
   described in 2).
   
   My guess is that somehow the events are passed to the last focused view,
   even after switching to another view.
(In reply to comment #3)
Lightning (20060110) behaves a little bit different:

2a) It is not possible to delete the event in the month view. 
    (As written in bug report)
3a) The 'events are passed to the last focused view' theory seems to apply too.
I find I can't delete an event at all in the new Sunbird multi-week view. Neither the Del key, nor the entry from the context menu, nor the entry on the Edit menu. No errors on cmdline nor on JS console. I can delete the entry from the Day view.

Linux/x86, my own build from CVS.

Is the above this bug, or do I need to log a new one, please?
(In reply to comment #5)
> I find I can't delete an event at all in the new Sunbird multi-week view.
> Neither the Del key, nor the entry from the context menu, nor the entry on the
> Edit menu. No errors on cmdline nor on JS console. I can delete the entry from

Using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060114 Mozilla Sunbird/0.3a1+ I have no problems with delete via context-menu/menu/toolbar.
You could retest with the official nightly build to see if this is somehow build specific.
will do, thanks.

I should have noted, though: it's weekly recurrent events that I cannot delete in the multi-week view. I *can* delete single events in that view, but not weekly recurring ones. Did you try that?
To delete a weekly recurring event, I have to either disable the recurrence, and then delete the resulting single event, or switch to a different view.
(In reply to comment #8)
> To delete a weekly recurring event, I have to either disable the recurrence,
> and then delete the resulting single event, or switch to a different view.

I think you should file a new bug for that.
thanks much; logged bug 323477.
At some level, the "right" fix for this bug might be to tie the delete <command> in with the host app's delete <command> so that it can take can advantage of delete toolbar and menu items.  This may require knowing about calendar mode vs. mail mode.  It may also be more work than we want to do before releasing Lightning 0.1.
I already submitted this patch for bug #323477, cross-submitting it here since it resolves the issue which is described in bug #320175. asking for review.
Assignee: base → michael.buettner
Status: NEW → ASSIGNED
Attachment #209949 - Flags: first-review?
Comment on attachment 209949 [details] [diff] [review]
patch for this task

Michael, please remember Bug 323477 comment 9 and always ask for review from a person.
Attachment #209949 - Flags: first-review? → first-review?(jminta)
Comment on attachment 209949 [details] [diff] [review]
patch for this task

Thanks for the patch! r=jminta here since this directly solves the problem described in this bug. (as opposed to bug 323477)
Attachment #209949 - Flags: first-review?(jminta) → first-review+
patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.