diff --git a/core/src/components/input/test/spec/index.html b/core/src/components/input/test/spec/index.html index 23a9c9c08c..b0f9279cb8 100644 --- a/core/src/components/input/test/spec/index.html +++ b/core/src/components/input/test/spec/index.html @@ -30,6 +30,10 @@ Stacked: input value + + Stacked: div +
A div
+
Floating: textarea diff --git a/core/src/components/item-sliding/test/test.utils.ts b/core/src/components/item-sliding/test/test.utils.ts index fa4ceb47fb..ab7ca3306b 100644 --- a/core/src/components/item-sliding/test/test.utils.ts +++ b/core/src/components/item-sliding/test/test.utils.ts @@ -8,14 +8,36 @@ export async function openItemSliding(id: string, page: any, rtl = false) { const centerX = parseFloat(boundingBox.x + boundingBox.width / 2); const centerY = parseFloat(boundingBox.y + boundingBox.height / 2); + // In LTR start the drag at the center, move halfway in between the + // center and 0, then end at 0 + // + // 0 boundingBox.width + // |---------|---------|---------|---------| + // endX halfX centerX + + let halfX = centerX / 2; let endX = 0; + + // In RTL start at the center, move halfway in between the center and + // the total width, then end at the total width + // + // 0 boundingBox.width + // |---------|---------|---------|---------| + // centerX halfX endX + if (rtl) { + halfX = centerX + (centerX / 2); endX = boundingBox.width; } + // Start in the center of the item await page.mouse.move(centerX, centerY); await page.mouse.down(); - await page.mouse.move(centerX / 2, centerY); + + // Move halfway first + await page.mouse.move(halfX, centerY); + + // Move all of the way to the end await page.mouse.move(endX, centerY); await page.mouse.up(); diff --git a/core/src/components/item/item.scss b/core/src/components/item/item.scss index 810de50f5d..4838fe1ef1 100644 --- a/core/src/components/item/item.scss +++ b/core/src/components/item/item.scss @@ -255,6 +255,11 @@ button, a { box-sizing: border-box; } +:host(.item-label-stacked) .item-native, +:host(.item-label-floating) .item-native { + align-items: start; +} + :host(.item-label-stacked) .input-wrapper, :host(.item-label-floating) .input-wrapper { flex: 1;