Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#11952 closed bug (notabug)

heightStyle "fill" option works incorrect if accordion container height set in %

Reported by: maximalist Owned by:
Priority: minor Milestone: none
Component: ui.accordion Version: 1.11.2
Keywords: Cc:
Blocked by: Blocking:

Description

In my case height is 100% Test example with original markup and CSS I have solve the problem by addiing event listener on window resize.

var a = $("#accordion_container"); a.accordion( { collapsible: true, heightStyle: "fill" } ); $(window).resize( function() {

var h = a.height(); a.find(".ui-accordion-header").each(function() {

var e = $(this); if(e.css("display") != "none")

h -= e.outerHeight(true);

}); a.find(".ui-accordion-content").css("height", h);

}); $(window).resize();

Since it is technically possible, I would like it to be implemented in mainstreame.

Change History (4)

comment:1 Changed 8 years ago by Scott González

Resolution: notabug
Status: newclosed

This is handled by the refresh method. See http://api.jqueryui.com/accordion/#method-refresh.

comment:2 Changed 8 years ago by maximalist

No it is not. Please look at example

comment:3 in reply to:  1 Changed 8 years ago by maximalist

No it is not. Please look at example

Replying to scott.gonzalez:

This is handled by the refresh method. See http://api.jqueryui.com/accordion/#method-refresh.

comment:4 Changed 8 years ago by Scott González

That's quite a complicated test case. Can you reduce to only using percent-based heights to prove that the ticket is accurate?

Note: See TracTickets for help on using tickets.