Summary:
Using jQuery's show() function with a parameter (such as "slow" or "fast") prevents a page from resizing to fit a Drupal form.
Behavior:
The two most common consequences I've noticed are: a) Drupal forms cannot be submit (because buttons at the bottom of the page are hidden beneath the footer of the page), and b) resizing a textarea causes remaining form fields to slide beneath the footer of the page, and thus become hidden from the user.
Reproduced in:
Firefox v1.5
Internet Explorer v6.0
Drupal v5.0 HEAD (as of estimated Oct 25th or so)
Themes: bluemarine, chameleon, marvin, pushbutton
Steps to reproduce:
- Pick any form on a Drupal site, preferably with at least one textarea (in this example, using
admin/settings/site-information) - Run jQuery's show() on that form ID (in this case,
system_site_information_settings)<code> $(document).ready(function () { $("#system_site_information_settings").show(); // To break, add parameter: "slow", "normal", or "fast". }); - Resize the textarea. The rest of the form should slide beneath the footer of the page, rather than the page and form resizing altogether.
jQuery's hide() and show() are amazing features, and I hope this issue can be resolved.
Thanks all!
Comments
Comment #1
raspberryman commentedUsing
show(speed)will create an inline style on the element. This style includes an absolute pixel height. The absolute value is what causes this bug.If I delete the absolute pixel height (using Firefox DOM Inspector), the issue is fixed.
A jQuery bug report exists for this behavior: http://jquery.com/dev/bugs/bug/276/
Comment #2
raspberryman commentededit to return issue title to original text... strange....
Comment #3
raspberryman commentedThis has been fixed by the awesome developers at jQuery. jQuery versions after 1.0.3 should have this fixed. Here is how jQuery bug #276 was closed: