mui / material-ui

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.
https://mui.com/material-ui/
MIT License
93.62k stars 32.22k forks source link

Textfield's maxlength ignores emoji. #11966

Closed edoko closed 6 years ago

edoko commented 6 years ago

Expected Behavior

I set the Textfield's maxlength, and typing emoji.

Current Behavior

But it ignores only emoji.

Steps to Reproduce (for bugs)

  1. I make TextField and set maxlength. <TextField label="내용" className="txt_story" value={this.state.story} onChange={this.handleChange2} margin="normal" inputProps={{ maxLength: 300 }} style={{ width: 300 }} />

  2. And I created a div to show the state. <span>{this.state.story}</span>

  3. normal Text(Hangeul, English, etc...) is okay, but emoji is ignore in maxlength. https://i.imgur.com/bbRpHEY.jpg

Context

Explained above.

Your Environment

Tech Version
Material-UI v1.2.3
React v16.4.1
browser Chrome, Android WebView
etc
oliviertassinari commented 6 years ago

maxLength: 300, the screenshot seems to match your example. I can't see any issue. Make sure you can't produce the problem with a native input.

Your issue has been closed because it does not conform to our issue requirements. Please provide a full reproduction test case. This would help a lot 👷 . A live example would be perfect. This codesandbox.io template may be a good starting point. Thank you!