diff --git a/core/src/components/item-sliding/item-sliding.tsx b/core/src/components/item-sliding/item-sliding.tsx index d2bce0e0dfd..2c0fbcc2013 100644 --- a/core/src/components/item-sliding/item-sliding.tsx +++ b/core/src/components/item-sliding/item-sliding.tsx @@ -422,6 +422,13 @@ export class ItemSliding implements ComponentInterface { style.transition = ''; } + if (openAmount !== 0) { + el.classList.remove('item-sliding-closing'); + if (this.gesture) { + this.gesture.enable(!this.disabled); + } + } + if (openAmount > 0) { this.state = openAmount >= this.optsWidthRightSide + SWIPE_MARGIN diff --git a/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts b/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts index 66797b3ad4e..0ba173e7232 100644 --- a/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts +++ b/core/src/components/item-sliding/test/basic/item-sliding.e2e.ts @@ -262,5 +262,21 @@ configs({ modes: ['ios'], directions: ['ltr'] }).forEach(({ title, config }) => await openStartOptions(page, true); }); + + test('opening opposite side should remove item-sliding-closing and keep options clickable', async ({ page }, testInfo) => { + testInfo.annotations.push({ + type: 'issue', + description: 'https://github.com/ionic-team/ionic-framework/issues/29975', + }); + + const slidingItem = page.locator('#item2'); + await slidingItem.evaluate(async (el: HTMLIonItemSlidingElement) => { + await el.open('end'); + await el.open('start'); + }); + await page.waitForChanges(); + + await expect(slidingItem).not.toHaveClass(/item-sliding-closing/); + }); }); });