When a fieldset is collapsed by default, and when I click to open it, I don't see any TEXTAREA within which has the 'resizable' class.
This problem is probably specific to Opera (I'm using Opera 9.22, and 9.20), as I don't see it on Firefox/IE/Safari.
This problem is new to Drupal 6.x. It doesn't exist in Drupal 5.x.
I'm attaching a screenshot that demonstrates the problem. Notice the 'Log message' TEXTAREA which isn't shown.
Further info:
When I remove the following 5 lines from 'textarea.js', the problem is solved:
// Inherit visibility
if ($(this).is(':hidden')) {
$(this).parent().hide();
$(this).show();
}
(But then the nifty teaser TEXTAREA on the node editing form won't work correctly.)
The fix:
I believe Opera does the right thing. The above code effectively does textarea_wrapper.style.display = 'none' on the enclosing element, so why should opening the fieldset cancel this operation?
To fix this problem I changed:
if ($(this).is(':hidden')) {
To:
if ($(this).is(':hidden') && $(grippie).is(':visible')) {
This ensures that the TEXTAREA wrapper is hidden because the TEXAREA was explicitly hidden and not because it is a descendant of some hidden element.
(I'll soon attach the patch.)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | resizable_admin_user_settings.png | 60.35 KB | mooffie |
| #1 | textarea.js_.patch | 888 bytes | mooffie |
| resizable_node_add_story.png | 48.06 KB | mooffie |
Comments
Comment #1
mooffie commentedHere's the patch.
Comment #2
mooffie commentedHere's another screenshot.
Note that the first TEXTAREA is shown correctly; this is because its fieldset is not collapsed by default. I mentioned previously that the problem occurs only when the fieldset is collapsed by default. The 'Password recovery email' fieldset is collapsed by default and in the screenshot you see that after I click it open the 'Body' TEXTAREA within isn't shown.
Note to testers: you don't need to use Opera to test this patch. It would be helpful if you just reported that after applying the patch the TEXTAREAs continue to behave correctly on your browser.
Comment #3
dvessel commentedCould you try this patch? http://drupal.org/node/163361
It's for a different reason but that same line is changed. Would be nice to kill 2 birds with one stone. :)
Comment #4
mooffie commented> Could you try this patch? http://drupal.org/node/163361
>
> It's for a different reason but that same line is changed.
Yes, your patch solves my problem too! :-) Thanks.
(We simply use two slightly different methods to single out the teaser. But isn't mine more general?)
Should I flag this issue as 'postponed'?
Comment #5
dvessel commentedFrom what I can see, the only time the textfield is hidden is when it's disabled and the attribute selector is more reliable than checking the visibility state.
Imagine a textarea that's hidden with the grippie being visible. They are both dependent on one another so it doesn't make much sense. That check seems closer to a hack.
It works in this case because it pushes the state of the text area to its parent. Assuming I'm right about the visibility of the textfield having a disabled attribute, then it should go in but the only case I checked was that teaser splitter. I've never ran into another resizable text area that needed to be hidden. It's either there, or not at all.
Comment #6
jrabeemer commentedI see this bug in Opera 9.23 It's missing the body fields for all collapsed boxes in /admin/user/settings under User E-Mail Settings. "Welcome, no approval required" is open by default and it's Body field is visible. The missing body fields are visible in the source.
Comment #7
chx commentedhttp://drupal.org/node/163361 said to resolve this so it's a duplicate.