Opened 2 years ago

Closed 17 months ago

#11938 closed bug (fixed)

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.

Change History (3)

comment:1 Changed 2 years ago by apushak

I have a fix for this in pull request #1536

comment:2 Changed 2 years ago by tj.vantoll

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/

comment:3 Changed 17 months ago by Scott González

Milestone: none1.12.0
Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.