Key events fire without key codes (understandable as you can 'swipe' whole words) and backspace fires no key[up|down|press] event at all.
Version: unspecified
Severity: major
Key events fire without key codes (understandable as you can 'swipe' whole words) and backspace fires no key[up|down|press] event at all.
Version: unspecified
Severity: major
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T171974 Improve and consolidate our unified editing platform so that it's great on all devices | |||
| Open | None | T94725 Make VisualEditor good enough for mobile tablet and phone default enablement | |||
| Open | None | T69262 VisualEditor Mobile: Chrome for mobile keyboard doesn't fire useful key events for backspace | |||
| Open | None | T202719 Backspace across paragraphs is broken on mobile VE (Android Chrome) |
There is an 'input' event which fires, but this doesn't solve the problem of prevent the default backspace behaviour.
See https://code.google.com/p/chromium/issues/detail?id=118639 for pitchfork waving, including a complaint from the Microsoft Office Web Apps team who are having the same problem.
Not quite true, see http://jsbin.com/alAKaNaZ/5
Backspace fires a keydown with keyCode 0 (same as every other key event) but not when whitespace is deleted.
See https://code.google.com/p/chromium/issues/detail?id=184812
"No key event is generated when the BACKSPACE key is pressed outside of composition, in other words, when AdapterInputConnection.deleteSurroundingText is called. In the reported bug, since the text field is empty, thus IME is not in the composition mode, thus pressing the BACKSPACE key triggers deleteSurroundingText and thus no key event is generated.
A cl that generates key events in deleteSurroundingText with a dummy keycode is under review at https://codereview.chromium.org/348413003/."
It looks like the above commit to Chrome for Mobile has been merged, which solves the most serious case (no event fired at all). We are still left with the general problem of IME deletion.
(In reply to Ed Sanders from comment #6)
It looks like the above commit to Chrome for Mobile has been merged, which
solves the most serious case (no event fired at all).
It doesn't "solve" it perfectly, as OS update lag for Android devices is notoriously slow (or non existent), and app update take-up is apparently poor. Is there a sane work-around we could do?
We are still left with the general problem of IME deletion.
Yeah. :-(
Note that Android 4.4's WebView is based on the Chromium engine, and unlike the standalone Chrome app it only gets updated with the OS. Might want to check whether the stock Android browser on non-Google-branded 4.4.x devices is also affected. (Nexus devices seem to leave out the AOSP default browser in favor of Chrome, but I see a customized version on Samsung Galaxy branded devices for instance.)
Looks like on latest Chrobile/iOSafari we get input+beforeinput events with an inputType of 'deleteContentBackward'. This should be enough to fix this (assuming we can preventDefault).
There is a still bug where no events are fired if the cursor is in an empty span, and deleting across a paragraph.