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:

  1. Pick any form on a Drupal site, preferably with at least one textarea (in this example, using admin/settings/site-information)
  2. 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".
    });

  3. 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

raspberryman’s picture

Title: jQuery's show() prevents page resize / renders forms unusable » Probable cause...

Using 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/

raspberryman’s picture

Title: Probable cause... » jQuery's show() prevents page resize / renders forms unusable

edit to return issue title to original text... strange....

raspberryman’s picture

Assigned: Unassigned » raspberryman
Status: Active » Closed (fixed)

This 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:

by brandon

This is now fixed in SVN REV: 576.
As a result of this fix the private method jQuery.setAuto is deprecated.
After a show is complete the only thing that should be inline is the opacity in Firefox.
After a hide is complete the only thing that should be inline is the display: none.
All other properties are reset back to the controlling stylesheet or browser defaults.