#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 follow-up: 3 Changed 8 years ago by
Resolution: | → notabug |
---|---|
Status: | new → closed |
comment:3 Changed 8 years ago by
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
That's quite a complicated test case. Can you reduce to only using percent-based heights to prove that the ticket is accurate?
This is handled by the
refresh
method. See http://api.jqueryui.com/accordion/#method-refresh.