Hi all,
On my test page here the first accordion (which is the demo text with three headings of the same length) works correctly. In the second accordion I have made the first heading content longer than the others and this seems to have an unwanted side effect:
with auto height:true,
the shorter headings have a lot of empty white space below (I think from copying the height from the first heading)
with auto height:false
With the headings all starting as collapsed, if I click any heading it works ok. If after opening a heading I close it and then open another heading it works ok. But if I open one heading eg the first and then without closing it click on a lower heading eg the third = I get pushed down the page to lower content or to the footer.
Any ideas please?
Thanks...
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | accordion_height_issues-2128487-12.patch | 602 bytes | cmanalansan |
Comments
Comment #1
mediaformat commentedSimilar issue :
debugging with uncommented console.log(options)
I can see autoHeight:false, yet the accordion opens height of tallest content.
Possibly related to jQuery update >1.6 : #2073491: Add autoheight and heightstyle for newer JQuery UI versions, #2084055: Autoheight won't go away with JQuery 1.7 or 1.8
Comment #2
mediaformat commentedComment #3
hmartens commentedI updated to jquery 1.9 as the related article said but that didn't change anything. What is everybody else doing to get the autoheight to disable?
Thank you
Comment #4
hmartens commentedOk I found on another forum the work around to this. I've added the following CSS and that fixed the autoheight problem:
.ui-accordion-content-active { height: inherit !important; }
Comment #5
carsonwThe Views Accordion module was experiencing the same issue at #2084055: Autoheight won't go away with JQuery 1.7 or 1.8.
The heightStyle variable needs to be set to content.
For example:
options['heightStyle'] = 'content';For the time being, I hard coded this into jquery_ui_filter_accordion.js just above the following:
Comment #6
codenamerhubarb commentedThanks carsonw, my accordion is now fully responsive and has no pesky scrollbar.
Comment #7
sketman commented#5 worked for me to, thanks!
Comment #8
jrockowitz commentedThis is a tricky issue to fix because D7 core ships with jQueryUI 1.8 which uses an 'autoHeight' option while newer versions of jQueryUI uses a 'heightStyle' option.
The D8 version of this module should probably support a more flexible way to set custom options so that multiple version of jQueryUI can be supported.
Comment #9
jrockowitz commentedComment #10
juc1 commented#5 worked for me, thanks...
Comment #11
knard commentedHere's another option that worked for me in D7. You can go into jquery_update folder under replace/ui/ui/minified directory and changing the options in the jquery.ui.accordion.min.js file.
The 'heightStyle' option was set to "auto". Once I changed that to "content" my dropdowns adjusted to the content perfectly.
Comment #12
cmanalansan commentedComment #5 worked for me, so I made it a patch.
Thanks @carsonw!
Comment #13
kingfisher64 commentedMany thanks for the solution it works lovely.
Comment #14
petertoen commented#4 worked fine for me, thanks a lot!
Comment #15
brightboldThanks @cmanalansan for the patch in #12! Solved the problem perfectly.