Hello.
I have some HTML from ips.ui.dialog doc page:
<a href='' data-ipsdialog data-ipsdialog-remotesubmit data-ipsdialog-extraClass='myDialog' data-ipsDialog-size='wide'>Some button</a>
<div id='elementWithDialog' class="ipsHide">
<div>Text for test</div>
</div>
ANd controller:
initialize: function () {
this.on( document, 'submitDialog', this.submitMyDialog );
},
/**
* Um, set up...
*/
submitMyDialog: function (e, data) {
var dialog = ips.ui.dialog.create( {
content: '#elementWithDialog',
size: 'wide',
extraClass: 'myDialog_finish',
} );
setTimeout(function (){
dialog.show();
}, 500);
},
What I do: I need to launch the second dialog immediately after the first one is closed with text "Text fro test".
Problem: After closing the first dialog, the second one opens, there is no problem with this. But if you repeat the procedure again, after closing the first, two second dialogs will open. Accordingly, after the third time, three dialogs will be open and so on indefinitely.