diff -u b/core/misc/ajax.js b/core/misc/ajax.js --- b/core/misc/ajax.js +++ b/core/misc/ajax.js @@ -959,7 +959,7 @@ $(this.element).prop('disabled', false); // Reattach behaviors, if they were detached in beforeSerialize(), and the // form is still part of the document. - if (this.$form && $.contains(document, this.$form.get(0))) { + if (this.$form && $.contains(document, this.$form.get(0))) { var settings = this.settings || drupalSettings; Drupal.attachBehaviors(this.$form.get(0), settings); } diff -u b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php --- b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php +++ b/core/modules/views_ui/tests/src/FunctionalJavascript/FilterCriteriaTest.php @@ -73,7 +73,8 @@ $create_new_filter_group->click(); $assert_session->assertWaitOnAjaxRequest(); - // Validate dragging to an invalid location doesn't work. + // Validate dragging works correctly and the new group will contain the new + // filter. $dragged = $page->find('css', ".tabledrag-handle"); $target = $page->find('css', '.filter-group-operator-row'); $dragged->dragTo($target);