Confirmation not waiting when deleting sections

3 posts by 3 authors in: Forums > CMS Builder
Last Post: July 9   (RSS)

By Deborah - July 3 - edited: July 3

I just tested this in v8.4. The confirmation modal remains visible for me, but clicking “Cancel” still erases the table.

~ Deborah

Hi All,

Thanks for the report! We were able to reproduce this locally and track it down, and we'll have this fixed in the next release.

If you'd like to patch it now, edit cmsb/lib/data-attr-handlers.js and search for "element.blur()"

And replace this:

                if (!confirm(message)) {
                    e.preventDefault();
                    e.stopImmediatePropagation();
                    element.blur();
                }
            }
        });

With this (adding ", true" before the final brace):

            if (!confirm(message)) {
                    e.preventDefault();
                    e.stopImmediatePropagation();
                    element.blur();
                }
            }
        }, true);

That makes the confirmation dialog run before anything else, so Cancel works again.

Hope that helps, and thanks so much for the bug report and confirmation!  Let me know if you any other questions.

Dave Edis - Senior Developer
interactivetools.com