Skip to content
Snippets Groups Projects
Commit 466c8ff5 authored by Angie Byron's avatar Angie Byron
Browse files

#561858 follow-up by effulgentsia: Avoid clobbering JS settings.

parent 8e4d4ec6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -246,6 +246,16 @@ function ajax_render($commands = array()) {
}
}
// Settings are handled separately, later in this function, so that changes to
// the ajaxPageState setting that occur during drupal_get_css() and
// drupal_get_js() get included, and because the jQuery.extend() code produced
// by drupal_get_js() for adding settings isn't appropriate during an AJAX
// response, because it does not pass TRUE for the "deep" parameter, and
// therefore, can clobber existing settings on the page.
if (isset($items['js']['settings'])) {
unset($items['js']['settings']);
}
// Render the HTML to load these files, and add AJAX commands to insert this
// HTML in the page. We pass TRUE as the $skip_alter argument to prevent the
// data from being altered again, as we already altered it above.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment