Skip to content

Commit ad87ddc

Browse files
committed
fix(form): delete question does not reset preview tab
1 parent 691d8f9 commit ad87ddc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/scripts.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,7 @@ var plugin_formcreator = new function() {
683683
if (typeof(id) === 'undefined') {
684684
return;
685685
}
686+
var that = this;
686687
if (confirm(i18n.textdomain('formcreator').__('Are you sure you want to delete this question?', 'formcreator'))) {
687688
jQuery.ajax({
688689
url: formcreatorRootDoc + '/ajax/question_delete.php',
@@ -697,6 +698,7 @@ var plugin_formcreator = new function() {
697698
var gridstack = container.gridstack;
698699
var row = $(item).attr('data-gs-y');
699700
gridstack.removeWidget(item);
701+
that.resetTabs();
700702
});
701703
}
702704
};

0 commit comments

Comments
 (0)