Skip to content
Merged
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
2 changes: 0 additions & 2 deletions core/src/components/input/input.ionic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@

// Cursor should match the native input when hovering over the target area.
cursor: text;

z-index: 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we ever figure out why this was added in the first place?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's still a question with no answer

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll just have to keep this in mind if we run into issues later. Have we verified if textarea is behaving correctly? It follows the same structure as input that it might also lead to the same issue.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a simple / quick test on the textarea and haven't found any issue so far

}

::slotted([slot="start"]),
Expand Down
56 changes: 55 additions & 1 deletion core/src/components/input/test/basic/input.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ configs().forEach(({ title, screenshot, config }) => {
await expect(input).toHaveScreenshot(screenshot(`input-with-placeholder`));
});
});

test.describe('input with clear button', () => {
test('should not have visual regressions with default label', async ({ page }) => {
await page.setContent(
Expand Down Expand Up @@ -63,6 +62,43 @@ configs().forEach(({ title, screenshot, config }) => {
await expect(input).toHaveScreenshot(screenshot(`input-with-clear-button-stacked`));
});
});
test.describe('input click behaviors', () => {
test('should not have visual regressions when user double clicks', async ({ page }) => {
await page.setContent(
`
<ion-input
label="Label"
clear-input="true"
value="Text"
></ion-input>
`,
config
);
const input = page.locator('ion-input');
const nativeInput = input.locator('input');
await nativeInput.dblclick();
// Validates the display of an input with a clear button.
await expect(input).toHaveScreenshot(screenshot(`input-dbclick`));
});
test('should not have visual regressions with stacked label when user double clicks', async ({ page }) => {
await page.setContent(
`
<ion-input
label="Label"
label-placement="stacked"
clear-input="true"
value="Text"
></ion-input>
`,
config
);
const input = page.locator('ion-input');
const nativeInput = input.locator('input');
await nativeInput.dblclick();
// Validates the display of an input with a clear button.
await expect(input).toHaveScreenshot(screenshot(`input-dbclick-stacked`));
});
});
});
});

Expand Down Expand Up @@ -185,6 +221,24 @@ configs({ modes: ['ionic-md'] }).forEach(({ title, screenshot, config }) => {
const container = page.locator('#container');
await expect(container).toHaveScreenshot(screenshot(`input-clear-button-focused`));
});

test('should not have visual regressions when user double clicks', async ({ page }) => {
await page.setContent(
`
<ion-input
label="Label"
label-placement="stacked"
clear-input="true"
value="Text"
></ion-input>
`,
config
);
const input = page.locator('ion-input');
const nativeInput = input.locator('input');
await nativeInput.dblclick();
await expect(input).toHaveScreenshot(screenshot(`input-dbclick`));
});
});
});

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading