Closed Bug 1515959 Opened 5 years ago Closed 5 years ago

Using up/down keys to select reminder in the custom reminder dialog modifies the reminder

Categories

(Calendar :: Dialogs, defect)

Lightning 6.6
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ssitter, Assigned: darktrojan)

Details

(Keywords: regression)

Attachments

(2 files)

Attached image customreminder.png —
Thunderbird 66.0a1 (BuildID 20181221092739) with Lightning 6.8a1

History:
Create event and setup multiple reminders in the custom reminder dialog
Save event and close it
Reopen the custom reminder dialog
Use the up/down arrows on the keyboard to change the selected reminder

Error:
The settings from the initially selected reminder are copied to all reminders, see screenshot.
I'd expect that only the selection changes without modifying the reminder.
Same problem using Thunderbird 64.0b4 (BuildID 20181129151909) with Lightning 6.6b4.
Version: Lightning 6.8 → Lightning 6.6
Looks like the detail controls are not updated when changing the list entry but its value is updating the list entry on blur. Changing the entries by clciking in the list works fine.

Geoff, is this a regression of the richlistbox conversion?
Flags: needinfo?(geoff)
Yeah, I'd say it could be. I'll come back and have another look at this when I get some time.
Nope, it's a regression from the XBL to CustomElement conversion. Colour me not surprised at all.
Flags: needinfo?(geoff)
Keywords: regression
Attached patch 1515959-alarms-dialog-1.diff — — Splinter Review
Two bugs for the price of one!

I discovered while testing that the alarm dialog doesn't respect the prefs calendar.alarms.(event, todo)alarmunit. So I fixed that too.
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9033740 - Flags: review?(philipp)
Comment on attachment 9033740 [details] [diff] [review]
1515959-alarms-dialog-1.diff

Review of attachment 9033740 [details] [diff] [review]:
-----------------------------------------------------------------

Sold! I do have some bargaining points though:

::: calendar/base/content/dialogs/calendar-event-dialog-reminder.js
@@ +254,5 @@
>      let listbox = document.getElementById("reminder-listbox");
>      let listitem = listbox.selectedItem;
>  
>      if (listitem) {
> +        suppressListUpdate = true;

Maybe wrap this in a try/finally to make sure it is unset if something wrong happens and doesn't bork alarm display.

@@ +395,5 @@
>      // Default is a relative DISPLAY alarm, |alarmlen| minutes before the event.
>      // If DISPLAY is not supported by the provider, then pick the provider's
>      // first alarm type.
>      let offset = cal.createDuration();
> +    if (alarmunit == "days") {

Can we use cal.alarms.setDefaultValues() instead?
Attachment #9033740 - Flags: review?(philipp) → review+
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/40bfc93a1dcc
Fix reminder dialog to respect default duration, and not overwrite existing reminders when changing the UI; r=Fallen
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → 6.8
I didn't use setDefaultValues as that creates a new alarm and adds it to the event/task, and we don't want that.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: