jquery/jquery-mobile — Issue #3393: Top of collapsible not visible when expanding accordion collapsible with lengthy content
Author: begmandev
Created: 2012-01-07 04:51:14+00:00
State: open

Collapsible accordion sets that contain lengthy content don't display the top of the collapsible section when one section is already expanded and a different section is expanded. Once the new collapsible is expanded you have to scroll up to see the beginning of the content for the expanded collapsible.

Although lengthy content obviously isn't the most ideal for small form factor devices, I originally noticed the problem presenting a set of required legal/copyright notices with fairly lengthy content. It seems like insuring that the top of the collapsible section is displayed after expanding would provide a better user experience.

Here is a jsbin with an accordion set with long sets of content: http://jsbin.com/uwahes

I worked around the issue by implementing the following event handler in my application:

```
$(":jqmData(role='collapsible')", $.mobile.activePage).click(function(e) {
$.mobile.silentScroll($(this).offset().top);
});
```