Download & Extend

Fieldset title does not include text enclosed in tags when collapsed

Project:Drupal core
Version:6.x-dev
Component:system.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

if the fieldset contains an EM - all between <em></em> is not displayed.

<fieldset class=" collapsible collapsed"><legend>Modules in <em>modules</em></legend>

Comments

#1

Title:fieldset legend incomplete» Fieldset title does not include text enclosed in tags when collapsed
Component:Garland theme» system.module

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?

AttachmentSizeStatusTest resultOperations
Fieldset title display bug #140253.png10.74 KBIgnored: Check issue status.NoneNone

#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

Version:5.1» 7.x-dev

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

Status:active» needs review

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.

AttachmentSizeStatusTest resultOperations
fieldset_html_in_title.patch626 bytesIdleFailed: 7589 passes, 46 fails, 514 exceptionsView details | Re-test

#6

Assigned to:Anonymous» Dublin Drupaller

thanks for the patch edkwh...I'll test it later. Looks good.

Dub

#7

Assigned to:Dublin Drupaller» Anonymous

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

Status:needs review» needs work

The last submitted patch failed testing.

#12

#13

Status:needs review» needs work

The last submitted patch failed testing.

#14

Version:7.x-dev» 6.x-dev

Fixed in D7: #676800: Fieldsets break design badly

#15

The bug definitely arises due the wildcard, either the core needs to filter out tags for collapsible titles or add something to allow certain formatting inside them.

I have tried several global fixes on my system, has anyone fully got this fixed?

nobody click here