Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Kirill Gromov Posted October 15, 2021 Posted October 15, 2021 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.
Management Matt Posted October 20, 2021 Management Posted October 20, 2021 Without seeing the surrounding code, it's hard to diagnose. It's worth nothing that when you close a dialog, it just gets hidden. You will need to call dialog.remove() if you want to remove it from the DOM. This may be the issue you are seeing.
Recommended Posts