fix(textarea): auto grow textarea line wraps long contents (#25928)
Resolves #25893
@ -45,4 +45,28 @@ test.describe('textarea: autogrow', () => {
|
|||||||
|
|
||||||
expect(await textarea.screenshot()).toMatchSnapshot(`textarea-autogrow-after-${page.getSnapshotSettings()}.png`);
|
expect(await textarea.screenshot()).toMatchSnapshot(`textarea-autogrow-after-${page.getSnapshotSettings()}.png`);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should break long lines without white space', async ({ page }) => {
|
||||||
|
test.info().annotations.push({
|
||||||
|
type: 'issue',
|
||||||
|
description: 'https://github.com/ionic-team/ionic-framework/issues/25893',
|
||||||
|
});
|
||||||
|
|
||||||
|
await page.setContent(
|
||||||
|
`<ion-app>
|
||||||
|
<ion-content>
|
||||||
|
<ion-textarea
|
||||||
|
auto-grow="true"
|
||||||
|
value="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz">
|
||||||
|
</ion-textarea>
|
||||||
|
</ion-content>
|
||||||
|
</ion-app>`
|
||||||
|
);
|
||||||
|
|
||||||
|
const textarea = await page.locator('ion-textarea');
|
||||||
|
|
||||||
|
expect(await textarea.screenshot()).toMatchSnapshot(
|
||||||
|
`textarea-autogrow-word-break-${page.getSnapshotSettings()}.png`
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
After Width: | Height: | Size: 147 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 147 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 123 KiB |
After Width: | Height: | Size: 126 KiB |
After Width: | Height: | Size: 35 KiB |
After Width: | Height: | Size: 123 KiB |
@ -101,6 +101,8 @@
|
|||||||
@include text-inherit();
|
@include text-inherit();
|
||||||
|
|
||||||
grid-area: 1 / 1 / 2 / 2;
|
grid-area: 1 / 1 / 2 / 2;
|
||||||
|
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.native-textarea {
|
.native-textarea {
|
||||||
|