Skip to content

[number field] Allow Persian digits in keyboard input - #4719

Merged
michaldudak merged 1 commit into
mui:masterfrom
lunaxislu:fix/number-field-persian-keydown
May 1, 2026
Merged

michaldudak merged 1 commit into
mui:masterfrom
lunaxislu:fix/number-field-persian-keydown

Conversation

@lunaxislu

Copy link
Copy Markdown
Contributor

Fixes #4718

Problem

Persian digits could not be typed into Number Field inputs because they were blocked during keyboard handling, even though the parser already supports them.

Solution

Allow Persian numerals through the same keyboard input path as Arabic, Han, and fullwidth numerals.

Test

Added a regression test that types Persian digits with user.type().

Ran:

pnpm test:jsdom NumberField --no-watch

@pkg-pr-new

pkg-pr-new Bot commented May 1, 2026

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/react@4719
    
    pnpm add https://pkg.pr.new/mui/base-ui/@base-ui/utils@4719
    

commit: 6605c2a

@code-infra-dashboard

code-infra-dashboard Bot commented May 1, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+20B(0.00%) 🔺+12B(+0.01%)

Details of bundle changes

Performance

Total duration: 1,277.74 ms ▼-52.08 ms(-3.9%) | Renders: 53 (+0) | Paint: 1,995.10 ms -41.71 ms(-2.0%)

Test Duration Renders
Dialog mount (300 instances) 82.40 ms 🔺+7.27 ms(+9.7%) 2 (+0)
Tabs mount (200 instances) 230.88 ms 🔺+4.79 ms(+2.1%) 4 (+0)
Checkbox mount (500 instances) 69.29 ms 🔺+2.91 ms(+4.4%) 1 (+0)
Popover mount (300 instances) 98.82 ms 🔺+2.62 ms(+2.7%) 2 (+0)
Tooltip mount (300 contained roots) 63.28 ms ▼-17.11 ms(-21.3%) 2 (+0)

…and 7 more — details


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

@netlify

netlify Bot commented May 1, 2026

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 6605c2a
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/69f46735a4d4590008f0c581
😎 Deploy Preview https://deploy-preview-4719--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@mj12albert mj12albert added component: number field Changes related to the number field component. labels May 1, 2026
@mj12albert mj12albert changed the title [number-field] Allow Persian digits in keyboard input [number field] Allow Persian digits in keyboard input May 1, 2026

@michaldudak michaldudak left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks for your contribution!

@michaldudak michaldudak added the type: bug It doesn't behave as expected. label May 1, 2026
@michaldudak
michaldudak merged commit e8fbc2f into mui:master May 1, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: number field Changes related to the number field component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[number field] Persian digit keyboard input is silently blocked

3 participants