-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Collection-Repeat with Caching and Modals causes app to crash in beta 14 #2879
Comments
Probably related to #2890 |
+1 |
Fixed via bb866da |
In short, the modal sends a resize event. The old collection repeat would recalculate everything on the resize event. The new collection repeat only recalculates on resize if the collection repeat is in view, and also doesn't recalculate everything anymore. It only recalculates what has to be recalculated on resize - up to the current scroll value. |
Or in the case of your codepen, nothing needs to be recalculated anymore since it uses static item heights... |
Latest nightly, you don't need item-height and item-width attributes anymore: http://codepen.io/anon/pen/wBjYJo If you don't supply width/height, it will getComputedStyle() of the first element and use that for the width/height of every element. |
Type: bug
Platform: all
- Home tab has a collection-repeat list in it. Each element has a picture. - A second tab has a button to open a modal. - When the modal is shown, it calls ionic.trigger('resize'); _(line 2955 of ionic-angular.js)_ - The collection-repeat on the home tab (which is cached as of b14) listens to this, calls collectionRepeatManager.resize() which then renders **all the non-showing elements** in the list. If there are pictures, **all the pictures are loaded**. And when run on device, the app likely crashes with an out of memory error. - Turning off cache for the Home tab eliminates the problem. - Removing collection-repeat eliminates the problem. - Commenting out the call to ionic.trigger('resize') eliminates the problem (for me).Codepen here: http://codepen.io/rajatrocks/pen/myOYLw
Discussion here: http://forum.ionicframework.com/t/collection-repeat-and-view-cache-weirdness/14651
The text was updated successfully, but these errors were encountered: