Fix bug 467338 - Closing task or calendar tab with other tab focussed breaks the focussed tab. r=Standard8

This commit is contained in:
Philipp Kewisch 2009-01-23 13:29:16 +01:00
Родитель c04b254a5b
Коммит 1f283fe62e
1 изменённых файлов: 16 добавлений и 3 удалений

Просмотреть файл

@ -66,6 +66,14 @@ var calendarTabType = {
},
showTab: function(aTab) {
ltnSwitch2Calendar();
},
closeTab: function(aTab) {
if (gCurrentMode == "calendar") {
// Only revert menu hacks if closing the active tab, otherwise we
// would switch to mail mode even if in task mode and closing the
// calendar tab.
ltnSwitch2Mail();
}
}
},
tasks: {
@ -77,6 +85,14 @@ var calendarTabType = {
},
showTab: function(aTab) {
ltnSwitch2Task();
},
closeTab: function(aTab) {
if (gCurrentMode == "task") {
// Only revert menu hacks if closing the active tab, otherwise we
// would switch to mail mode even if in calendar mode and closing the
// tasks tab.
ltnSwitch2Mail();
}
}
},
},
@ -87,9 +103,6 @@ var calendarTabType = {
saveTabState: function(aTab) {
ltnSwitch2Mail();
},
closeTab: function(aTab) {
ltnSwitch2Mail();
},
};
window.addEventListener("load", function(e) {
document.getElementById('tabmail').registerTabType(calendarTabType); }, false);