Skip to content

Commit 3ea795c

Browse files
Copilotdmytrokirpa
andauthored
fix(web-components): TextArea overflow scrolling in Firefox (#36621)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dmytrokirpa <1492102+dmytrokirpa@users.noreply.github.com> Co-authored-by: Dmytro Kirpa <dmytrokirpa@microsoft.com>
1 parent adc2cc4 commit 3ea795c

4 files changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: show TextArea scrollbar for overflowing content",
4+
"packageName": "@fluentui/web-components",
5+
"email": "198982749+Copilot@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

packages/web-components/src/textarea/textarea.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,15 @@ test.describe('TextArea', () => {
242242
await expect(element).not.toHaveCustomState('user-valid');
243243
await expect(element).toHaveCustomState('user-invalid');
244244
});
245+
246+
test('should allow the control to scroll overflowing content', async ({ fastPage }) => {
247+
const { element } = fastPage;
248+
const control = element.locator('textarea');
249+
250+
await fastPage.setTemplate();
251+
252+
await expect(control).toHaveCSS('overflow', 'auto');
253+
});
245254
});
246255

247256
test.describe('internal label', () => {

packages/web-components/src/textarea/textarea.styles.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ label[hidden] {
221221
field-sizing: content;
222222
max-block-size: 100%;
223223
outline: 0;
224+
overflow: auto;
224225
resize: none;
225226
text-align: inherit;
226227
}

packages/web-components/src/textarea/textarea.styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ export const styles: ElementStyles = css`
269269
field-sizing: content;
270270
max-block-size: 100%;
271271
outline: 0;
272+
overflow: auto;
272273
resize: none;
273274
text-align: inherit;
274275
}

0 commit comments

Comments
 (0)