Commit 47ca221a authored by Dries's avatar Dries
Browse files

- Patch #1400310 by nod_: Fixed Use of .parents() is really .closest().

parent 22078d27
......@@ -536,7 +536,7 @@ Drupal.ajax.prototype.commands = {
// Attach all JavaScript behaviors to the new content, if it was successfully
// added to the page, this if statement allows #ajax['wrapper'] to be
// optional.
if ($('html').find(new_content).length > 0) {
if (new_content.parents('html').length > 0) {
// Apply any settings from the returned JSON if available.
var settings = response.settings || ajax.settings || Drupal.settings;
Drupal.attachBehaviors(new_content, settings);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment