mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-03 15:26:07 +00:00
Bug 313615 Automatically close the alarm window when the last alarm is dismissed. r=dmose
This commit is contained in:
parent
9ec51e95ba
commit
6217e9d593
@ -95,7 +95,13 @@ function onDismissAlarm(event)
|
||||
{
|
||||
// everything is just visual at this point. we don't need to do anything special.
|
||||
var alarmWidget = event.target;
|
||||
alarmWidget.parentNode.removeChild(alarmWidget);
|
||||
var parent = alarmWidget.parentNode;
|
||||
parent.removeChild(alarmWidget);
|
||||
|
||||
if (!parent.hasChildNodes()) {
|
||||
// If this was the last alarm, close the window.
|
||||
window.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user