Close child windows on dialog close
Fixes issue with crash when parent window was already closed and then user tried to close child window. Example: Tools -> Spelling and message box ("Spellcheck completed") Change-Id: I30fef5adb33ba4208b1ee48f3bbced1cff2969d1 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91468 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com>
This commit is contained in:
parent
cd73939022
commit
fbaedcd212
1 changed files with 16 additions and 0 deletions
|
@ -1183,7 +1183,23 @@ L.Control.LokDialog = L.Control.extend({
|
|||
console.log('_onCalcInputBarClose: end');
|
||||
},
|
||||
|
||||
_closeChildWindows: function(dialogId) {
|
||||
// child windows - with greater id number
|
||||
var that = this;
|
||||
var foundCurrent = false;
|
||||
|
||||
Object.keys(this._dialogs).forEach(function(id) {
|
||||
if (foundCurrent && !that._isSidebar(id) && !that._isCalcInputBar(id))
|
||||
that._onDialogClose(id, true);
|
||||
|
||||
if (id == dialogId)
|
||||
foundCurrent = true;
|
||||
});
|
||||
},
|
||||
|
||||
_onDialogClose: function(dialogId, notifyBackend) {
|
||||
this._closeChildWindows(dialogId);
|
||||
|
||||
if (window.ThisIsTheiOSApp)
|
||||
w2ui['editbar'].enable('closemobile');
|
||||
|
||||
|
|
Loading…
Reference in a new issue