Repository navigation
Closed
Labels
Milestone
Description
Bug Report
Ionic version:
[x] 4.x
Current behavior:
If an <ion-item-sliding> is dragged down in <ion-list>, it is possible to slide <ion-item-options>. But if the item is dragged up in the list, sliding is no longer possible.
Expected behavior:
Sliding should still be possible if the item is dragged up in the list
Steps to reproduce:
See gif above
Related code:
<ion-list>
<ion-reorder-group (ionItemReorder)="reorderConfigurationsList($event)" disabled="false">
<ion-item-sliding *ngFor="let configuration of _configurationsList">
<ion-item lines="full" color="white">
<ion-label>
<h2>{{configuration.name}}</h2>
<ion-note>Created: {{ configuration.created | date: 'MM/dd/yy HH:mm' }}</ion-note>
</ion-label>
<ion-reorder slot="end"></ion-reorder>
</ion-item>
<ion-item-options side="start">
<ion-item-option>Favorite</ion-item-option>
<ion-item-option color="danger">Share</ion-item-option>
</ion-item-options>
<ion-item-options side="end">
<ion-item-option>Unread</ion-item-option>
</ion-item-options>
</ion-item-sliding>
</ion-reorder-group>
</ion-list>
reorderConfigurationsList(ev) {
const itemToMove = this._configurationsList.splice(ev.detail.from, 1 ) [0];
this._configurationsList.splice(ev.detail.to, 0, itemToMove );
ev.detail.complete();
}
Other information:
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.1.2
@angular-devkit/build-angular : 0.13.6
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.6
@ionic/angular-toolkit : 1.4.1
Cordova:
cordova (Cordova CLI) : 8.1.2 ([email protected])
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)
System:
ios-sim : 8.0.0
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2 Build version 10E125
Reacted by shreeshbhat, Paul Berry, tmk1991, zhaoxu666 and reed-lawrence
Metadata
Metadata
Assignees
Labels
Type
Fields
No fields configured for issues without a type.

Activity
liamdebeasi commentedon Mar 27, 2019
Hi there,
Thanks for the issue. Can you provide a repository with the code required to reproduce this issue? I am unable to reproduce it with the code snippet you provided.
Thanks!
alperbalkaya commentedon Mar 27, 2019
Of course. https://github.com/alperbalkaya/ionicReorderBug
liamdebeasi commentedon Mar 29, 2019
Thanks for the follow up.
I have been investigating this issue and have a couple observations:
componentDidUnloadis being called on theion-item-slidingthat was moved. This is causing any gesture listeners on the element to be destroyed (including the listener that lets you reveal the sliding options).componentDidUnloadis called, there are still 3 items in the DOM (there were 3 to begin with). One would assume that the re-ordered item was destroyed and then re-created, butcomponentDidLoadwas never fired. So I'm not sure if that means a) the component was firingcomponentDidUnloadwhen it should not have been or b) the component was being re-created but not firingcomponentDidLoadwhen it should have been. (it also could be another case I'm not even thinking of 🙂)I'm going to continue to dig into this, but just wanted to keep you in the loop.
Thanks!
liamdebeasi commentedon Apr 1, 2019
Hi everyone,
There are some changes to Stencil actively being worked on that we think may resolve this issue. I am going to do some testing with it later this week and will post here when I have an update.
Thanks!
4 remaining items
digaus commentedon Apr 30, 2019
Issue also appears when using reorder group inside another reorder group.
changan712 commentedon Apr 30, 2019
c
pauljohnberry commentedon Jun 3, 2019
Just for information, I have a similar issue. In my case I have an ion-range slider in the ion-item being reordered, When I reorder and change the underlying array (ie: ev.detail.complete(this.myArray);), the slider freezes. nb: this behavior does not manifest itself when just calling ev.detail.complete().
andreas-aeschlimann commentedon Jun 12, 2019
I have the same issue.
I can confirm that this is a valid workaround. However, the whole list "blinks" for a short moment because for some reason, redrawing in Ionic is not as smooth as with Angular.
brandyscarney commentedon Jul 23, 2019
Thanks for the issue! I was able to test out the latest Ionic with the update to Stencil One and confirmed it is still an issue in
4.6.2and latest.BDominik commentedon Jul 26, 2019
fix(all): component reusage (#18963)
fix(all): component reusage (#18963)
fix(all): component reusage (#18963)
Wilsonoonn commentedon Sep 3, 2019
At present, in 4.12.0, there is still this problem, there is no final solution?
@liamdebeasi
liamdebeasi commentedon Sep 3, 2019
@Wilsonoonn This issue was fixed and will be available in the next stable release of Ionic. For any new bug, I recommend creating a new issue.
ionitron-bot commentedon Oct 3, 2019
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.