[pickers] text is highlighted after picking date
Steps to reproduce
This issue is already described here: https://github.com/mui/mui-x/issues/8145
And seemed to have been later on fixed here: https://github.com/mui/mui-x/pull/8228
However, there seems to be a regression as it's happening on the latest version again:
Your environment
npx @mui/envinfo
System:
OS: Windows 10 10.0.19045
Binaries:
Node: 22.14.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.0 - C:\Program Files\nodejs\npm.CMD
pnpm: Not Found
Browsers:
Chrome: Not Found
Edge: Chromium (134.0.3124.72)
npmPackages:
@emotion/react: ^11.13.3 => 11.14.0
@emotion/styled: ^11.13.0 => 11.14.0
@mui/core-downloads-tracker: 7.1.0
@mui/icons-material: ^7.1.0 => 7.1.0
@mui/material: ^7.1.0 => 7.1.0
@mui/private-theming: 7.1.0
@mui/styled-engine: 7.1.0
@mui/system: 7.1.0
@mui/types: 7.4.2
@mui/utils: 7.1.0
@mui/x-charts: ^7.29.1 => 7.29.1
@mui/x-charts-vendor: 7.20.0
@mui/x-date-pickers: ^7.29.4 => 7.29.4
@mui/x-internals: 7.29.0
@types/react: ^18.3.10 => 18.3.20
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
typescript: ^5.6.2 => 5.8.2
Search keywords: datepicker, highlight, selection
Could you please provide a reproduction of your implementation? It seems you have some custom things going on as well as a different formatting.
I cannot reproduce this on the docs, so it does seem to work correctly OOTB
This issue has been inactive for 7 days. Please remove the stale label or leave a comment to keep it open. Otherwise, it will be closed in 5 days.
This issue has been closed due to 5 days of inactivity after being marked stale.
I'm not sure if it's counted as a minimal reproduction of the issue, but the same issue can be seen on the Mui documentation page for the DateRangePicker field on the "Use a multi input field" section.
- Visit page
- Open dev tools and switch the dimensions to a mobile device
- Click on the "Start" field of the multi-input box
- Select any single date
- Click "OK"
- Notice that some of the text in the "Start" text input box is now selected
It is expected that the text would not be selected after clicking the "OK" button because the focus should not be returned to the text input box.
For me, none of the fixes from https://github.com/mui/mui-x/issues/8145 solved the issue