Skip to content

[input base] Move multiline padding to the textarea - #49020

Open
yiheng-kkk wants to merge 1 commit into
mui:masterfrom
yiheng-kkk:fix/23928-multiline-caret-padding
Open

[input base] Move multiline padding to the textarea#49020
yiheng-kkk wants to merge 1 commit into
mui:masterfrom
yiheng-kkk:fix/23928-multiline-caret-padding

Conversation

@yiheng-kkk

Copy link
Copy Markdown

Summary

  • move the built-in multiline padding from the InputBase, FilledInput, and OutlinedInput roots to the native textarea
  • make the textarea own the padding hit area so Firefox can place the caret nearest to the click
  • preserve the existing padding and dimensions across variants, sizes, hidden labels, adornments, and autosizing scroll

Fixes #23928

Validation

  • focused Firefox browser regressions: 3 passed

  • relevant Firefox browser suites: 121 passed, 3 skipped

  • relevant Node suites: 100 passed, 24 skipped

  • TypeScript, ESLint, Prettier, and git diff --check: passed

  • interactive Firefox RED → GREEN: clicking the upper-left padding kept the caret at offset 22 before the fix and moved it to offset 0 after the fix

  • I have followed (at least) the PR section of the contributing guide.

AI assistance disclosure: this PR was prepared with Codex assistance; the final diff and validation outputs were reviewed before submission.

@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-49020--material-ui.netlify.app/
QR code for https://deploy-preview-49020--material-ui.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/material ▼-849B(-0.16%) ▼-125B(-0.08%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/private-theming 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@zannager zannager added scope: input Changes related to the input. scope: textarea Changes related to the textarea. labels Aug 24, 2026
@zannager
zannager requested a review from silviuaavram August 24, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: input Changes related to the input. scope: textarea Changes related to the textarea.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Textfield] multiline: correct cursor positioning on click in padding-area

2 participants