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.
Problem/Motivation
#3111124: Force inclusion of drupal.collapse shim added the Drupal core shim to support details in older browsers. However, the shim expects specific markup so the content can be opened and closed when clicking the summary.
Proposed resolution
Add the html markup that is expected by drupal/collapse so older browsers can open and close content of the details element.
Remaining tasks
- Write a patch
- Review
- Commit
User interface changes
Older browsers can open and close content of the details element.
API changes
None.
Data model changes
The ckeditor details plugin requires div[class="details-wrapper"] to be allowed in the html filter.
Comment | File | Size | Author |
---|---|---|---|
#8 | 3159065-8.patch | 4.87 KB | Lendude |
#8 | interdiff-3159065-7-8.txt | 647 bytes | Lendude |
#7 | 3159065-7.patch | 4.85 KB | Lendude |
#7 | interdiff-3159065-6-7.txt | 396 bytes | Lendude |
#6 | 3159065-5.patch | 4.91 KB | idebr |
Comments
Comment #2
idebr CreditAttribution: idebr at iO commentedAttached patchs adds the html markup that is expected by drupal/collapse so older browsers can open and close content of the details element.
Comment #3
idebr CreditAttribution: idebr at iO commentedAttached patch adds the following changes:
Comment #4
mandclu CreditAttribution: mandclu at Northern Commerce commentedThanks for your work on this. I'll have to merge this in with some other work on the module lately, but that should be manageable. One question: You add the additional markup in the template definition, but I believe this only changes the markup within the editor. If the main aim is to provide the markup for visitors (presumably that's when the shim is most likely to be needed) then I would think the change needs to be made to the theme function (which your patch appears to remove entirely).
Comment #5
idebr CreditAttribution: idebr at iO commented#4 I think you are referring to the
Drupal.theme.detail
method? I could not find any calls to this code, so I removed it.Comment #6
idebr CreditAttribution: idebr at iO commentedReroll for latest HEAD.
Comment #7
LendudeAdding the 'allowed content' killed the ability to add nested details (among other things). Removed the 'allowed content' for the content field.
Comment #8
Lendude#7 was adding additional wrappers, this should fix that.
Comment #10
mandclu CreditAttribution: mandclu commentedI believe this was included in the code already merged as part of #3201638: Entering an accordion title the spacebar does not produce the expected space so marking this as fixed.