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 | SlidingState.SwipeStart
|
||||||
: SlidingState.Start;
|
: SlidingState.Start;
|
||||||
} else {
|
} 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.tmr = setTimeout(() => {
|
||||||
this.state = SlidingState.Disabled;
|
this.state = SlidingState.Disabled;
|
||||||
this.tmr = undefined;
|
this.tmr = undefined;
|
||||||
|
if (this.gesture) {
|
||||||
|
this.gesture.enable(true);
|
||||||
|
}
|
||||||
}, 600) as any;
|
}, 600) as any;
|
||||||
|
|
||||||
openSlidingItem = undefined;
|
openSlidingItem = undefined;
|
||||||
style.transform = '';
|
style.transform = '';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
style.transform = `translate3d(${-openAmount}px,0,0)`;
|
style.transform = `translate3d(${-openAmount}px,0,0)`;
|
||||||
this.ionDrag.emit({
|
this.ionDrag.emit({
|
||||||
amount: openAmount,
|
amount: openAmount,
|
||||||
|
|||||||
Reference in New Issue
Block a user