Skip to content

Conversation

@siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Dec 23, 2025

Issue

Screen.Recording.2568-12-23.at.14.54.59.mov

Root cause

When Enter starts edit mode, event.preventDefault() was not called in useGridCellEditing.ts. The unprevented Enter key propagated to the newly rendered textarea, causing the browser to insert a newline.

Solution

Add event.preventDefault() at line 170 when event.key === 'Enter' starts edit mode.

Added a test to confirm


@siriwatknp siriwatknp requested a review from a team December 23, 2025 07:54
@siriwatknp siriwatknp added type: bug It doesn't behave as expected. scope: data grid Changes related to the data grid. feature: Editing Related to the data grid Editing feature labels Dec 23, 2025
@mui-bot
Copy link

mui-bot commented Dec 23, 2025

Deploy preview: https://deploy-preview-20751--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 🔺+21B(+0.01%) 🔺+5B(0.00%)
@mui/x-data-grid-pro 🔺+21B(0.00%) 🔺+5B(0.00%)
@mui/x-data-grid-premium 🔺+21B(0.00%) 🔺+5B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against 8ef46c1

@siriwatknp siriwatknp merged commit 433cc12 into mui:master Dec 23, 2025
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: Editing Related to the data grid Editing feature scope: data grid Changes related to the data grid. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants