From 7f67b4d936c392d59339b93ffb11499d4bd9d149 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 28 Sep 2011 10:52:37 +0800 Subject: [PATCH] Roo/MessageBox.js --- Roo/MessageBox.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Roo/MessageBox.js b/Roo/MessageBox.js index 43fb3fd5fa..51107a1c71 100644 --- a/Roo/MessageBox.js +++ b/Roo/MessageBox.js @@ -276,9 +276,18 @@ Roo.Msg.show({ * @param {Object} config Configuration options * @return {Roo.MessageBox} This message box */ - show : function(options){ + show : function(options) + { + + // this causes nightmares if you show one dialog after another + // especially on callbacks.. + if(this.isVisible()){ + this.hide(); + this.alert("ERROR", "Multiple dialogs where displayed at the same time"); + throw "Roo.MessageBox ERROR : Multiple dialogs where displayed at the same time"; + } var d = this.getDialog(); opt = options; -- 2.39.2