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.
We just had an issue with Drupal and sIFR--it turned out that sIFR was adding class "sIFR-active" to the html element, but then drupal.js was stomping on it. Would it not make sense to replace:
document.documentElement.className = 'js';
with
$(document.documentElement).addClass('js');
?
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal-DRUPAL-5.html-js.patch | 526 bytes | sun |
#1 | js_class_add_not_overwrite_head.patch | 650 bytes | dvessel |
#1 | js_class_add_not_overwrite_6.patch | 662 bytes | dvessel |
Comments
Comment #1
dvessel CreditAttribution: dvessel commentedMakes sense to me. Brief testing brought no issues. Shouldn't have any side-effects.
Marking for Head. Patch supplied for both 6/head.
Comment #2
Dries CreditAttribution: Dries commentedI think this makes sense indeed.
Comment #3
nedjoYes, a simple and appropriate improvement. Not marking RTBC because I haven't tested, though arguably a change this simple doesn't need testing.
Comment #4
Dries CreditAttribution: Dries commentedI've committed this to CVS HEAD because I think it is the right thing to do. I'll let Gabor review the Drupal 6 version of the patch just to make sure we had a couple more eyes look at it. :-)
Comment #5
Gábor HojtsyLooks right. I think this code predates jQuery and was not properly updated yet. Also, it probably did not surface yet, because the HTML root tag is not commonly used to class the page (the body is much more often used). Committed to 6.x.
I looked at the D5 code, and it also looks like this should be fixed there, so moving to Drupal 5.
Comment #6
drummPatch does not apply in Drupal 5.x.
Comment #7
sunComment #8
drummCommitted to 5.x.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.