[TextField] Cursor jumps to beginning when clicking outside the default line-height area #44395
Labels
browser: Safari
component: text field
This is the name of the generic UI component, not the React module!
external dependency
Blocked by external dependency, we can’t do anything about it
Steps to reproduce
Link to live example: (required)
Go to the TextField demo page on MUI’s website.
Steps:
Screen.Recording.2024-11-12.at.9.56.12.AM.mov
3 .Observe the cursor behavior—it should ideally position itself where you clicked but instead jumps to the beginning of the text. Unless you click in the small native input line height.
Current behavior
When using the TextField component, clicking within the input area but outside the default line-height (e.g., in the top half of the input area) causes the cursor to jump to the beginning of the text instead of positioning where the click occurred. This behavior causes the input field to respond in an unexpected and inconsistent way for users.
Expected behavior
The cursor should appear at the exact location where the user clicks within the input area, aligning with standard input field behavior and enhancing user experience.
Context
This issue affects the user experience by causing unexpected cursor jumps within the input area. It occurs even with the default TextField styling, making it a general issue in applications that use MUI’s TextField component.
Your environment
npx @mui/envinfo
Search keywords: TextField cursor placement , TextField line-height issue, TextField cursor misalignment, MUI TextField cursor jump
The text was updated successfully, but these errors were encountered: