Keyboard event event.key is unidentified
See original GitHub issueBug description: I have a texteditor ( quill.js ) in my webview, and there is a bug in it, enter ( new line ) does not change text focus
I try to figure out what is the problem and add ‘keydown’ event to a custom div with content-editable. and after that I see the value of event.key is unidentified for all input
To Reproduce: Try load webview with this html
<div
tabindex="1"
contenteditable="true"
id="test-test"
style="width: 300px; height: 300px;"
></div>
<script>
document
.getElementById("test-test")
.addEventListener("keydown", function (e) {
alert(e.key || e.keyCode || "empty");
});
</script>
Expected behavior: event.key or event.keyCode has value
Screenshots/Videos:
Environment:
- OS: android
- OS version: android 9
- react-native version: 62.2
- react-native-webview version: 10.3.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:13
Top Results From Across the Web
Keyboard event event.key is unidentified on android webview
The is a deliberate decision from the Android touch keyboard implementation. The only workaround is dealing the actual input text: inputElement.
Read more >event.key = Unidentified, event.keyCode = 229 #14512
I just listen to the input 's 'keydown' event through the onKeyDown and print what key I've pressed. In chrome, the key is...
Read more >KeyboardEvent.key - Web APIs | MDN
The KeyboardEvent interface's key read-only property returns the value of the key ... A keyup event is fired once the key is released....
Read more >Virtual Keyboard event.key=Unidentified - Ignition
I am trying to capture the onKeyDown event and use the key the user pressed, but when using chrome on android the key...
Read more >Keyboard: keydown and keyup
The keydown events happens when a key is pressed down, and then keyup – when ... keyCode should be 229 and e.key should...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically
After a research i figure out this is not bog for react native webview, its for os or maybe chrome ( actualy there is fight here https://bugs.chromium.org/p/chromium/issues/detail?id=118639 ) so this is not going to fix because of they are blaming each other!