Side navigation
#4852 closed bug (worksforme)
Opened July 04, 2009 08:16PM UTC
Closed November 21, 2010 01:41AM UTC
Last modified April 20, 2011 06:49AM UTC
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)
Change History (5)
Changed July 04, 2009 08:36PM UTC by comment:1
Changed November 17, 2009 04:42PM UTC by comment:2
I am experiencing this same bug in Firefox 3.5 Linux, but also in Opera 10.01 Linux. jQuery is 1.3.2.
Changed November 17, 2009 04:53PM UTC by comment:3
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).
Changed November 21, 2010 01:41AM UTC by comment:4
priority: | minor → low |
---|---|
resolution: | → worksforme |
status: | new → closed |
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.
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.
Changed April 20, 2011 06:49AM UTC by comment:5
To help anyone with this issue. All works well if you remove the 'width' specification in the inner div. Cheers.
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.