Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

collapsible set corner bug in 1.0.1 #3529

Closed
kamikaze opened this issue Feb 2, 2012 · 4 comments
Closed

collapsible set corner bug in 1.0.1 #3529

kamikaze opened this issue Feb 2, 2012 · 4 comments
Assignees
Milestone

Comments

@kamikaze
Copy link

kamikaze commented Feb 2, 2012

Before 1.0.1 collapsible set which was populated dynamically and then refreshed - worked ok: http://jsfiddle.net/ekeAJ/

Starting from 1.0.1 it is broken: http://jsfiddle.net/AtCKa/

@ghost ghost assigned Wilto Feb 2, 2012
@kamikaze
Copy link
Author

kamikaze commented Feb 6, 2012

Looks like code execution is not reaching collapsible-set widget's _create() method. At the same time collapsible's _create() runs fine for non-in-set widgets and collapsibles that are inside set. That's why in-set collapsibles look like independent.

@Wilto
Copy link
Contributor

Wilto commented Feb 20, 2012

Looks like this may be related to the changes in 94389bd

Kicking this your way, @gseguin. Thanks!

@ghost ghost assigned gseguin Feb 20, 2012
@gseguin
Copy link
Contributor

gseguin commented Feb 23, 2012

Good catch!

The decoupling of collapsible and collapsibleSet is the root cause of that issue. Before, everytime the create event was triggered the entire block was enhanced.

In the 1.0.1 codebase, create causes $.mobile.collapsibleset.prototype.enhanceWithin to be called on the collapsibleset element which in turn will call its _init method, not _create since at that time the collapsible set is already wigetized (https://github.com/jquery/jquery-mobile/blob/1.0-stable/js/jquery.ui.widget.js#L117).

So there are two parts to that issue:

  1. collapsibleset should expose a refresh method to handle dynamic content which should enhance collapsible within.
  2. User error due to lack of API: don't use the create event to refresh the content of the collapsible set ;)

@kamikaze
Copy link
Author

Great, thanks! Will test today :)
Yeah. Confirming fix :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants