Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#4852 closed bug (worksforme)

jQuery's slideDown/toggle "snap" when they improperly guess the height of an element

Reported by: Sasha Owned by:
Priority: low Milestone: 1.4
Component: effects Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:

Description

This has been tested in Firefox 3.5. It does not appear to affect Konqueror nor Opera. I am attaching a file, but the things that appear to cause this bug to occur are:

+ You wrap the div that you are toggling in another div. This outer div has a "max-width" set to something. + You then toggle the internal div which has a lot of text/HTML making it multiple lines, but no "height" set.

I am thinking that the toggle/slideDown function attempts to discern the height of the internal div, but comes up short, so it does not slide the element all the way, causing the "snapping" effect.

Attachments (1)

test.html (1.8 KB) - added by Sasha 10 years ago.
Test file demonstrating the slideDown/toggle issue (in Firefox 3.5, at least.)

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by Sasha

Attachment: test.html added

Test file demonstrating the slideDown/toggle issue (in Firefox 3.5, at least.)

comment:1 Changed 10 years ago by Sasha

Update: this may be a Firefox bug (it affects 3.0 as well, by the way.) jQuery is in fact getting the wrong height from the "cur" function, which in my example (with my font settings) was returning 209px when the true height was 228px. jQuery would toggle, reach 209px, then suddenly the other 19px would appear. But I am not sure if this is fixable without fixing the underlying Firefox bug, though I do not really know.

comment:2 Changed 10 years ago by Cilyan

I am experiencing this same bug in Firefox 3.5 Linux, but also in Opera 10.01 Linux. jQuery is 1.3.2.

comment:3 Changed 10 years ago by Cilyan

The bug occurs too in Midori 0.2.0 (WebKit). The snap seems to occur at exactly the same height (for the eye, it is just two lines of text before end).

comment:4 Changed 9 years ago by jitter

Priority: minorlow
Resolution: worksforme
Status: newclosed

Thanks for taking the time to contribute to the jQuery project by writing a bug report and providing a testcase!

I tried your test with FF 3.6.12 and FF 4b4 but I can't reproduce this.

test case

If you feel this ticket was incorrectly closed and this bug still persists for you feel free to report back with a reproducible test case.

comment:5 Changed 9 years ago by anonymous

To help anyone with this issue. All works well if you remove the 'width' specification in the inner div. Cheers.

Note: See TracTickets for help on using tickets.