зеркало из https://github.com/mozilla/pjs.git
Bug 313615 Automatically close the alarm window when the last alarm is dismissed. r=dmose
This commit is contained in:
Родитель
45d2ad38d9
Коммит
bf65cdd50a
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче