-
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: Slidebox pull to refresh Error: read only property #3589
Comments
Please provide code so we can debug. |
Surely, sorry should have done that to begin with! To remove the error, replace the slidebox in the example with anything, or nothing. error thrown when pulling to refresh. Thanks! Inline is the same as this codepen: http://codepen.io/mmullins/pen/BNaVJv angular.module('starter.controllers', []).controller('DashCtrl', function($scope) {
$scope.refreshFeed = function() {
//pause the infinite
$scope.$broadcast('scroll.infiniteScrollComplete');
$scope.noMoreItemsAvailable = true;
//reset the array (0,1 is an exaggeration but causes a failure)
$scope.items = $scope.items.slice(0, 1);
$scope.$broadcast('scroll.refreshComplete');
//would allow continue of infinite
//$scope.noMoreItemsAvailable = false;
};
$scope.noMoreItemsAvailable = false;
$scope.loadMore = function() {
$scope.items.push({
id : $scope.items.length
});
if ($scope.items.length == 99) {
$scope.noMoreItemsAvailable = true;
}
$scope.$broadcast('scroll.infiniteScrollComplete');
};
$scope.items = [];
}); <ion-view view-title="Dashboard">
<ion-content class="padding">
<ion-refresher
on-refresh="refreshFeed()"></ion-refresher>
<ion-list>
<ion-item ng-repeat="item in items"
item="item"
href="#/item/{{item.id}}">
<ion-slide-box >
<ion-slide>
<div class="box blue">
<h1>BLUE</h1>
</div>
</ion-slide>
<ion-slide>
<div class="box yellow">
<h1>YELLOW</h1>
</div>
</ion-slide>
<ion-slide>
<div class="box pink">
<h1>PINK</h1>
</div>
</ion-slide>
</ion-slide-box>
</ion-item>
</ion-list>
<ion-infinite-scroll ng-if="!noMoreItemsAvailable" on-infinite="loadMore()" distance="10%"></ion-infinite-scroll>
</ion-content>
</ion-view> |
I see the same error in the kill function on this line of ionic.js:
It looks like slides.length is read-only so an error is thrown. |
This update did not fix the issue for me. |
The commit did not fix the issue for me too. |
@perrygovier looks like there was a mistake in the commit, fredgalvao added a note in the commit with what looks to be the correct change |
wow, yeah. that'll teach me to commit a fix quickly on my way out the door. Thanks |
Type: bug
Platform: ios 8 webview
Ion-slide-box inside ng-repeat throws an error on a pull to refresh, happens when attempting to reassign an object in the scope. ex: Resetting total posts count to 5 after having a long post list.
I attempted to wrap in timeouts to see if that would mitigate, it did not.
it appears to only happen when there is an ion-slide inside the slidebox (aka if you fake a slidebox without a slide, there is no issue)
It appears to be related to (or the same as?) this angular issue:
angular/angular.js#9128
iOS 8.3(12F70) iPhone 6+
Error does not present itself in browser, only on iOS
Error Thrown:
The text was updated successfully, but these errors were encountered: