loleaflet/src/control/Control.LokDialog.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit fbaedcd212f8651b54ab2074dc0065c41580de60 Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Apr 1 10:56:31 2020 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Sun Apr 5 14:29:12 2020 +0200 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 <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/loleaflet/src/control/Control.LokDialog.js b/loleaflet/src/control/Control.LokDialog.js index 675526299..84c541e6b 100644 --- a/loleaflet/src/control/Control.LokDialog.js +++ b/loleaflet/src/control/Control.LokDialog.js @@ -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'); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits