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: 1 addition & 1 deletion packages/mui-material/src/FilledInput/FilledInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
}`,
left: 0,
bottom: 0,
content: '"\\00a0"',
content: '""',
position: 'absolute',
right: 0,
transition: theme.transitions.create('border-bottom-color', {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const InputRoot = styled(InputBaseRoot, {
borderBottom: `1px solid ${bottomLineColor}`,
left: 0,
bottom: 0,
content: '"\\00a0"',
content: '""',
position: 'absolute',
right: 0,
transition: theme.transitions.create('border-bottom-color', {
Expand Down
21 changes: 21 additions & 0 deletions test/regressions/fixtures/TextField/StandardTextField.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import TextField from '@mui/material/TextField';

export default function StandardTextField() {
return (
<div>
<div>
<TextField label="Standard" variant="standard" />
<TextField label="Standard disabled" variant="standard" disabled />
<TextField label="Standard error" variant="standard" error />
<TextField label="Standard required" variant="standard" required />
</div>
<div>
<TextField value="Material" label="Standard" variant="standard" />
<TextField value="Material" label="Standard disabled" variant="standard" disabled />
<TextField value="Material" label="Standard error" variant="standard" error />
<TextField value="Material" label="Standard required" variant="standard" required />
</div>
</div>
);
}
15 changes: 15 additions & 0 deletions test/regressions/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,21 @@ async function main() {
});
});

describe('TextField', () => {
it('should render standard variant correctly in forced-colors mode', async () => {
await page.emulateMedia({ forcedColors: 'active' });
try {
const testcase = await renderFixture('/regression-TextField/StandardTextField');
await takeScreenshot({
testcase,
route: '/regression-TextField/StandardTextFieldForcedColors',
});
} finally {
await page.emulateMedia({ forcedColors: 'none' });
}
});
});

describe('Textarea', () => {
it('should keep input caret position at the end when adding a newline', async () => {
await renderFixture('/regression-Textarea/TextareaAutosize');
Expand Down
Loading