diff --git a/src/js/form-builder.js b/src/js/form-builder.js index b44a5c0b1..6235bb1b8 100644 --- a/src/js/form-builder.js +++ b/src/js/form-builder.js @@ -155,7 +155,7 @@ function FormBuilder(opts, element, $) { return false } - if ($(ui.item).closest('.stage-wrap') && $(ui.item).closest(rowWrapperClassSelector).length === 0) { + if ($(ui.item).closest('.stage-wrap').length && $(ui.item).closest(rowWrapperClassSelector).length === 0) { h.doCancel = true processControl(ui.item) } else {