Fieldset title does not include text enclosed in tags when collapsed
hass - April 30, 2007 - 10:10
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | system.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
if the fieldset contains an EM - all between <em></em> is not displayed.
<fieldset class=" collapsible collapsed"><legend>Modules in <em>modules</em></legend>
#1
Managed to replicate this bug in 5.1 and with a contributed theme (glossyblue), tested on Firefox 2, Mac. When the fieldset is expanded, the title is displayed as usual, but when collapsed, text enclosed in tags (e.g. em, strong) are hidden. Changed title to reflect the issue better. See the attached screenshot for an example.
I traced it to a css declaration in the system.css file around line 309:
html.js fieldset.collapsed * {display: none;
}
Removing that seems to fix the problem and I don't see other repercussions. But I am no expert in css and not sure if it serves another purpose. Comments from css experts?
#2
Removing that line will cause fieldsets to snap shut after the DOM completes loading. This wouldn't be noticable if you're only testing locally. Better patch needed.
#3
Any news???
#4
The bug is still present.
It was also reported here:
http://drupal.org/node/251292
I had to change the form definition from:
<?php$form[$role] = array(
'#type' => 'fieldset',
'#collapsible' => true,
'#collapsed' => true,
'#title' => t('Front Page for %rolename.', array('%rolename' => $rolename)),
);
?>
to
<?php
$form[$role] = array(
'#type' => 'fieldset',
'#collapsible' => true,
'#collapsed' => true,
'#title' => t('Front Page for !rolename.', array('!rolename' => $rolename)), // % becomes !
);
?>
#5
Attached patch seems to fix this issue in Safari 3.1 (Mac), Firefox 2.0.0.8 (Mac) and IE6 (Mac). Need more testing to verify though; not sure if there are any side effects.
#6
thanks for the patch edkwh...I'll test it later. Looks good.
Dub
#7
oops. wrong module. I don't have permissions to commit to the system.module. changing assigned to status
#9
As i remember from a Garland bug regarding this issue the above patch have side effects... try to search for a "garland legend" issue...
#10
As a warning, * affects tags that would not normally be displayed - not that the legend is likely to contain a script or a style tag, of course.
#11
The last submitted patch failed testing.
#12
See: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
#13
The last submitted patch failed testing.