Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/src/components/item-sliding/item-sliding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions core/src/components/item-sliding/test/basic/item-sliding.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/);
});
});
});
Loading