Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The fullscreen version of the ajax-progress loader is inserted after the body.
Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
this.progress.element = $('<div class="ajax-progress ajax-progress-fullscreen"> </div>');
$('body').after(this.progress.element);
};
You should not insert html elements after the body, it is not valid HTML and will fail W3C. Try testing this, which is what Drupal generates.
<!DOCTYPE html>
<html>
<head>
<title>TEST</title>
</head>
<body></body>
<div></div>
</html>
$('body').after() should be replaced with $('body').append()
Comment | File | Size | Author |
---|---|---|---|
#9 | interdiff_3-9.txt | 1.13 KB | shaal |
#9 | core-prepend-ajax-progress-fullscreen-2955000-9.patch | 991 bytes | shaal |
Comments
Comment #2
chishah92 CreditAttribution: chishah92 at Valuebound commentedComment #3
chishah92 CreditAttribution: chishah92 at Valuebound commentedHave added patch to fix appending valid HTML
Comment #4
chishah92 CreditAttribution: chishah92 at Valuebound commentedComment #7
Chi CreditAttribution: Chi commentedThis needs to be changed in ajax.es6.js file.
https://www.drupal.org/node/2815083
Comment #8
Chi CreditAttribution: Chi commentedBesides the non-valid HTML markup it is also impossible to use body classes for styling as the throbber is placed outside body.
Comment #9
shaalI created a patch for ajax.es6.js file.
Comment #10
Chi CreditAttribution: Chi commentedWorks perfect for me. Thanks.
Comment #11
Chi CreditAttribution: Chi commentedComment #13
shaalRandom core media test error which is unrelated,
I ran the test again and it's successful.
Switching back to "Needs Review"
Comment #14
shaalThis was already RTBC'd in #10
But that status changed due to an unrelated random media test that failed, and at #13 I switched it back to "Needs Review", instead of RTBC.
Comment #15
lauriiiCommitted 2a48f46 and pushed to 8.8.x. Thanks!
Comment #17
lauriii