mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
fix(item-sliding): closing an item can no longer be interrupted (#23973)
resolves #23969
This commit is contained in:
@ -394,16 +394,28 @@ export class ItemSliding implements ComponentInterface {
|
||||
? SlidingState.Start | SlidingState.SwipeStart
|
||||
: SlidingState.Start;
|
||||
} else {
|
||||
/**
|
||||
* Item sliding cannot be interrupted
|
||||
* while closing the item. If it did,
|
||||
* it would allow the item to get into an
|
||||
* inconsistent state where multiple
|
||||
* items are then open at the same time.
|
||||
*/
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(false);
|
||||
}
|
||||
this.tmr = setTimeout(() => {
|
||||
this.state = SlidingState.Disabled;
|
||||
this.tmr = undefined;
|
||||
if (this.gesture) {
|
||||
this.gesture.enable(true);
|
||||
}
|
||||
}, 600) as any;
|
||||
|
||||
openSlidingItem = undefined;
|
||||
style.transform = '';
|
||||
return;
|
||||
}
|
||||
|
||||
style.transform = `translate3d(${-openAmount}px,0,0)`;
|
||||
this.ionDrag.emit({
|
||||
amount: openAmount,
|
||||
|
||||
Reference in New Issue
Block a user