How to detect key down event for arrow key on textarea?
events, javascript, safari
Solution
Official answer from Apple:
Thank you for contacting Apple Developer Technical Support (DTS). Our engineers have reviewed your request and have concluded that there is no supported way to achieve the desired functionality given the currently shipping system configurations.
Problem
Create the following html-page: ``` <textarea id="code" rows="10"></textarea> <script> document.onkeydown = function(event) { alert(event.keyCode); } </script> ``` Open it on Mobile Safari (on a simulator or on a device with keyboard), tap on textarea to start editing. And now press any arrow key - event won't fire. How to detect key down for arrow keys? P.S. Related issue on Apple Bug Report system: 13243285