Fix bug 672816 - Snoozing/Dismissing one event on alarm popup closes entire window. r=philipp
authorDon Rhummy <donrhummy@yahoo.com>
Mon, 25 Jul 2011 10:49:02 +0200
changeset 8349 d9230f21632a0b51bcc75c6295f204d3242ec93c
parent 8348 dbccd428da1a5e2e474c17c8c3b703c9608978c4
child 8350 95972f87ab48d3196c0b03f4376f7ecba8b69d4e
push id84
push userbugzilla@standard8.plus.com
push dateTue, 16 Aug 2011 21:25:04 +0000
treeherdercomm-beta@6970c86be3cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs672816
Fix bug 672816 - Snoozing/Dismissing one event on alarm popup closes entire window. r=philipp
calendar/base/content/dialogs/calendar-alarm-dialog.js
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.js
@@ -299,25 +299,25 @@ function removeWidgetFor(aItem, aAlarm) 
 }
 
 /**
  * Close the alarm dialog if there are no further alarm widgets
  */
 function closeIfEmpty() {
     let alarmRichlist = document.getElementById("alarm-richlist");
     if (!alarmRichlist.hasChildNodes()) {
-        // check again next round since this removeWidgetFor call may be
+        // check again in a short while since this removeWidgetFor call may be
         // followed by an addWidgetFor call (e.g. when refreshing), and
         // we don't want to close and open the window in that case.
         function closer() {
             if (!alarmRichlist.hasChildNodes()) {
                 window.close();
             }
         }
-        setTimeout(closer, 0);
+        setTimeout(closer, 250);
     }
 }
 
 /**
  * Handler function called when an alarm entry in the richlistbox is selected
  *
  * @param event         The DOM event from the click action
  */