From 352ad8f558626c98711d9f726eea656a83489dc3 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Mon, 21 May 2012 18:44:21 +0200 Subject: [PATCH] Modal stack: fix handling of destroyed actors Destroyed modal actors should be completely removed from the modal stack automatically, including leaving modality if needed. This allows for destroying modal dialogs without calling close(). --- js/ui/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ui/main.js b/js/ui/main.js index 8942de214..a9b6a2b6b 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -668,7 +668,7 @@ function pushModal(actor, timestamp, options) { let actorDestroyId = actor.connect('destroy', function() { let index = _findModal(actor); if (index >= 0) - modalActorFocusStack.splice(index, 1); + popModal(actor); }); let curFocus = global.stage.get_key_focus(); let curFocusDestroyId;