diff --git a/src/mami.js/controls/msgbox.jsx b/src/mami.js/controls/msgbox.jsx index f431a63..2192323 100644 --- a/src/mami.js/controls/msgbox.jsx +++ b/src/mami.js/controls/msgbox.jsx @@ -11,8 +11,10 @@ const MamiMessageBoxContainer = function() { if(typeof dialog !== 'object' || dialog === null) throw 'dialog must be a non-null object'; - const backgroundClick = () => { - dialog.clickButtonIndex(0); + const backgroundClick = ev => { + ev.stopPropagation(); + if(ev.target === container) + dialog.clickButtonIndex(0); }; try {