Backspace Key Events aren't fired using the Google keyboard




Firefox for Android
Keyboards and IME
3 years ago
2 years ago


(Reporter: scolville, Unassigned)


Dependency tree / graph

Firefox Tracking Flags




Using FF android (stable (33) and nightly 36.0a1) with the google keyboard
When hitting backspace no keypress/keydown events appear to be fired.

What should happen 

I'd expect to key events to fire.

What happens:


Using the Samsung keyboard hitting backspace does appear to fire key events as expected.

This behaviour is seen on S3 with 4.3 and a nexus 5 with android 5.0

This impacts Marketplace payments on Android.
Summary: With the Google keyboard selected and using FFAndroid → Key Events aren't fired using the Google keyboard
Summary: Key Events aren't fired using the Google keyboard → Backspace Key Events aren't fired using the Google keyboard
Chrome appears to fire keyUp/keyDown events for backspace using the same keyboard.
OS: Mac OS X → Android
Hardware: x86 → All


3 years ago
tracking-fennec: --- → ?
Jim - Can you take a look and see if this is related to our IME code?
Assignee: nobody → nchen
I believe this is a variant of bug 737658
Jim - Fixed by or related to bug 1112212?
tracking-fennec: ? → +
I think bug 1112212 will fix it. I can check once it lands.
Depends on: 1112212

Comment 6

3 years ago
As an additional data point, this is currently one of the blockers for proper CodeMirror support on Firefox Android.
I've CC'ed some other folks working on IME and reset the assignee.
Assignee: nchen → nobody
Using this test [0], I can see/verify keyup/keydown events for Google keyboard on my GS3 and my N7.

I wonder if we can close this one (?).


Comment 9

2 years ago
no events for me in Firefox 46 in contentEditable area. Also if switching to a second keyboard (russian in my case, no keydown/keypress/keyup events for character keys as well)

I'm testing with an N7/6.0.1 with Google and SwiftKey IME in their English languages, and using the testcase [0]. I see consistent events fired in all three edit cases (contentEditable, HTMLInputElement, and HTMLTextAreaElement) for browser on Desktop and in Android, when typing for example:

) backspace char
) letter 'b' char
) spacebar char

The one difference between desktop and mobile, is backspace does not generate a keypress, between its keydown and keyup. I'll file a separate bug for that.

For your second issue, are you using a custom Russion IME, and if so can you identify it on PlayStore? I tested with the Google and SwiftKey russian language option and still see keydown/keyup events.

NOTE, the keypress event is noticed when pressing spacebar and return chars only, and doesn't seem to be provided at all by Chrome, for example.


Comment 11

2 years ago
it seems the problem is in onkeypress event handler rather than in custom keyboards. When I do

data:text/html,<div contentEditable='true' onkeypress='console.log(event.key);'>ha</div>

then I don't have logs for standard Russian Google keyboard, however I do see logging in your test case from above.
You need to log in before you can comment on or make changes to this bug.