Closed Bug 1609407 Opened 4 years ago Closed 4 years ago

key events do not trigger when oninput is also assigned to input

Categories

(GeckoView :: IME, defect)

68 Branch
defect
Not set
normal

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: jan.gregor, Assigned: m_kato)

References

Details

(Keywords: inputmethod)

Attachments

(2 files)

Attached file index.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Steps to reproduce:

When typing to input only onInput triggers not key events.

Actual results:

console returns only
oninput

Expected results:

console returns
onkeydown
oninput
onkeyup

This only happens in Firefox for android. It behaves as expected on Firefox desktop.

Product: Firefox for Android → GeckoView
Version: Firefox 68 → 68 Branch

Asking the GV team to triage this one.

Makoto, is this expected?

Flags: needinfo?(m_kato)

What Keyboard/IME do you use? GBoard?

Flags: needinfo?(m_kato) → needinfo?(jan.gregor)

Since intl.ime.hack.on_any_app.fire_key_events_for_composition is true, we will disptach keyboard event....

Ah, I may have to turn on intl.ime.hack.on_any_apps.fire_key_events_for_composition for release build.

Assignee: nobody → m_kato
Flags: needinfo?(jan.gregor)

Nakano-san, do you have any concern to turn on intl_ime_hack_on_any_apps_fire_key_events_for_composition on Android release build?

Flags: needinfo?(masayuki)

Hmm, I didn't know it. As far as I tested on Fenix Nightly, the behavior is not so odd. So, it may work better unless web apps do something for Firefox for Android. In strictly speaking, we should have blacklist pref to turn it back off in some domains. However, I guess that it must be really rare web apps to do something only for Firefox for Android due to the share. And fortunately, GeckoView is still preview for next generation Firefox for Android so that I think it's good timing to change it right now.

Blocks: 354358
Flags: needinfo?(masayuki)

(In reply to Makoto Kato [:m_kato] from comment #4)

What Keyboard/IME do you use? GBoard?

I tested this with android(AOSP) keyboard and GBoard

(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #8)

Hmm, I didn't know it. As far as I tested on Fenix Nightly, the behavior is not so odd. So, it may work better unless web apps do something for Firefox for Android. In strictly speaking, we should have blacklist pref to turn it back off in some domains. However, I guess that it must be really rare web apps to do something only for Firefox for Android due to the share. And fortunately, GeckoView is still preview for next generation Firefox for Android so that I think it's good timing to change it right now.

Chrome dispatches keydown and keyup for this situation with GBoard (although we don't have telemetry data that how many people are GBoard users.) So if there is any issues by dispatching keydown/keyup on mobile web, Chrome will hit same issue.

(In reply to Jan Gregor from comment #9)

(In reply to Makoto Kato [:m_kato] from comment #4)

What Keyboard/IME do you use? GBoard?

I tested this with android(AOSP) keyboard and GBoard

Thanks.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Some IMEs such as GBoard use IME composition for prediction even if en-us
language. And it won't generate KeyEvent via InputConnection object.
Actually, we can emulate key event for this situation via
intl.ime.hack.on_any_apps.fire_key_events_for_composition, so let's turn on
this preference for release build.

Also, Chrome/Android dispatch key event on prediction, so GeckoView should
dispatch it too.

Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/30e202fe574a
Turn on intl.ime.hack.on_any_apps.fire_key_events_for_composition for release build. r=masayuki
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Depends on: 1499076

Moving some input bugs to the new GeckoView::IME component.

Component: General → IME

Moving some cursor and key event bugs to the new GeckoView::IME component.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: