You can clone with
I call controlgroup constructor when data is updated on a page using knockoutjs, so that jqm control styles can be re-applied correctly. The following code used to work, until I upgraded to jqm 1.1.1. Every time the constructor is called, the fieldset width would shrink. This only happens when a fieldset controlgroup is inside of a div fieldcontain. Fieldset not nested inside of a div fieldcontain still works fine. The problem is observed in Google Chrome in Windows and Safari on iPad. I have not tried other browsers yet. Here is the sample code:
Thanks for reporting the issue with a test page.
Actually we noticed the bug ourselves while we were updating the JQM ThemeRoller to 1.1.1., when it is was already too late to fix this.
This regression is caused by a change we made to have the buttons of the controlgroup always being wrapped in a div with class ui-controlgroup-controls (for styling purposes) and not only if there is a legend. What happens now is that each time controlgroup() is called, the div is wrapped again.
Besides a fix I am looking into a temporary workaround for people. If I have one, I will post it in a comment here.
Controlgroup: Prevent the controls from being wrapped multiple times.…
… Fixes #4716 - Calling controlgroup constructor causes fieldset width to shrink.
I committed a fix for this. Unfortunately there is not a workaround that you can add to your custom script. Good news is that it will be fixed in 1.2 which is on its way.
Thank you very much!