Skip to main content

Search and Top Navigation

#11938 closed bug (fixed)

Opened April 13, 2015 01:49AM UTC

Closed February 09, 2016 07:41PM UTC

Accordion: height is sometimes wrong if calculated while accordion is closed

Reported by: apushak Owned by:
Priority: minor Milestone: 1.12.0
Component: ui.accordion Version: 1.11.4
Keywords: Cc:
Blocked by: Blocking:
Description

If an accordion height is calculated while the accordion is closed, in some cases the calculated height is too short, so when the accordion opens, one or more lines don't show and a vertical scroll bar appears.

I've tested and seen the bug in the following browsers:

  • Chrome 41.0.2272.118 m
  • Firefox 37.0.1
  • IE 11.0.9600.17690

and with:

  • jquery 2.1.3 & jquery-ui 1.11.4
  • jquery 2.0.2 & jquery-ui 1.10.3

OS:

  • Windows 8.1

Here is a jsFiddle where you can see this issue http://jsfiddle.net/apushak/64jmafkz/

I've determined that this happens when the height of the measured element has display: none instead of display: block. I will be submitting a pull request with a fix soon.

Attachments (0)
Change History (3)

Changed April 13, 2015 02:28AM UTC by apushak comment:1

I have a fix for this in pull request #1536

Changed May 09, 2015 09:43PM UTC by tj.vantoll comment:2

status: newopen
summary: Accordion height is sometimes wrong if calculated while accordion is closedAccordion: height is sometimes wrong if calculated while accordion is closed

PR link: https://github.com/jquery/jquery-ui/pull/1536

Also, marking this ticket as valid as the issue still occurs in master: http://jsfiddle.net/64jmafkz/4/

Changed February 09, 2016 07:41PM UTC by scottgonzalez comment:3

milestone: none1.12.0
resolution: → fixed
status: openclosed

Fixed in c87653bc24f5bc84c299b047d49a06c132a48788.