可拖动元素上的jQuery手风琴,可拖动高度不会自动调整大小

问题描述:

我在可拖动元素上使用jquery手风琴,将元素拖动后,当其内部的手风琴折叠时,其高度不会自动调整大小.

I am using jquery accordion on draggable element, after the element dragged, its height is not autoresized when the accordion inside it is collapsed.

这是什么问题?

从我发现这似乎是一个反复出现的问题,拖动后容器高度不会设置为自动".

From what I could find this seems to be a recurring issue, the container height won't be set back to 'auto' after dragging.

错误"显然是Firefox确实遵守的CSS规范的限制;可以在这里找到很多细节和jsfiddle示例: http://bugs.jqueryui.com/ticket/10725

The 'bug' is apparently a limitation of the CSS spec that Firefox does comply with; quite some details and jsfiddle examples can be found here: http://bugs.jqueryui.com/ticket/10725

到目前为止,我的解决方案是在需要时自行将高度设置为自动":

My solution so far is to set the height to 'auto' myself when needed:

$('#container').css({height; 'auto'});

这当然是不雅的,并且您必须在容器中的每个动态内容更改之后编写它.仍然可以使您的代码正常工作,直到添加选项为止(按照 http://bugs.jqueryui.com/ticket/3011 ).

Of course this is inelegant, and you have to write it after every dynamic content change in your container. Still it makes your code work until an option is added (follow http://bugs.jqueryui.com/ticket/3011 for that).

欢呼