Created
February 22, 2019 03:09
-
-
Save LeaVerou/78b6ab63152068da047398e57786a438 to your computer and use it in GitHub Desktop.
Cannot insert emojis in input with maxlength="1"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Cannot insert emojis in input with maxlength="1" | |
*/ | |
input { | |
font-size: 20px; | |
width: 30em; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Try entering an emoji below (you can copy this: 💩): | |
<p><input maxlength="1"> | |
<p> | |
<p><input maxlength="1" value="Oddly enough, value can be as long as you want 💩"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment