Closed Bug 1670129 Opened 4 years ago Closed 3 years ago

Updates to inputmode/enterkeyhint don't take effect until the next time the text field is focused.

Categories

(Core :: DOM: Editor, defect, P3)

Firefox 83
defect

Tracking

()

RESOLVED FIXED
93 Branch
Tracking Status
firefox93 --- fixed

People

(Reporter: rkjnsn, Assigned: m_kato)

References

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:81.0) Gecko/20100101 Firefox/81.0
Firefox for Android

Steps to reproduce:

(I discovered this bug on Firefox Android, but I'm filing here since this is where the other enterkeyhint bugs are. Let me know if I should file on Github, instead.)

  1. Visit https://jsfiddle.net/06dopzac/4/show on Firefox Nightly on Android.
  2. Tap focus the text field.
  3. Type some text.

Actual results:

The symbol on the enter key doesn't change unless one unfocuses and refocuses the text field.

Expected results:

The symbol on the enter key should change from "enter" to "send" as soon any text has been entered into the text field.

The source code of the sample can be viewed at https://jsfiddle.net/06dopzac/4.

This issue also occurs when setting mozactionhint dynamically. The sample works as expected on Chrome.

I need this functionality for an in-progress web app.

Hello, Erik thank you for this report!
https://github.com/mozilla-mobile/fenix/issues/17046

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → MOVED

We initialize this value when taking focus. So I think that we should call SetInputContext when changing this value.

Blocks: 1648332
Status: RESOLVED → REOPENED
Component: Untriaged → DOM: UI Events & Focus Handling
Ever confirmed: true
Product: Firefox → Core
Resolution: MOVED → ---
Component: DOM: UI Events & Focus Handling → DOM: Editor
Status: REOPENED → NEW

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

We initialize this value when taking focus. So I think that we should call SetInputContext when changing this value.

It looks like the path to fix is simple enough. Can you suggest an assignee?

Severity: -- → S3
Flags: needinfo?(m_kato)
Priority: -- → P3

(In reply to Henri Sivonen (:hsivonen) (away from Bugzilla until 2021-01-11) from comment #4)

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

We initialize this value when taking focus. So I think that we should call SetInputContext when changing this value.

It looks like the path to fix is simple enough. Can you suggest an assignee?

I would like to ship this, so I handle this. But changing enterkeyhint dynamically causes that keyboard layout is changed (It means that composing text is destroyed). So this is related to https://github.com/whatwg/html/issues/4876 and I have to check iOS's implementation.

Assignee: nobody → m_kato
Flags: needinfo?(m_kato)

Safari/iOS doesn't support dynamically updating of enterkeyhint. Until resolving https://github.com/whatwg/html/issues/4876, we won't handle this...

Blink and WebKit support dynamically change of inputmode. When the focused
element's inputmode value is changed, software keyboard layout will be
changed by new value.

Actually, Gecko references it when getting focus only now. So we should apply
dynamically change like other browsers.

Also, enterkeyhint has same issue. Current WebKit is same behaviour as
Gecko, but Blink is same as inputmode behaviour. So I would like to change
this like inputmode.

When focus isn't changed and inputmode in focused element is changed to none,
we should dismiss software keyboard.

Also, this has same issue for changing from none to text to show software
keyboard.

When changing inputmode, icNotifyIMEContext is called then we should control
software keyboard open/close state too.

Depends on D122490

Summary: Updates to enterkeyhint don't take effect until the next time the text field is focused. → Updates to inputmode/enterkeyhint don't take effect until the next time the text field is focused.
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/3519ff8b4fb4
InputContext has to synchronize with current inputmode or enterkeyhint if this value is updated. r=masayuki
https://hg.mozilla.org/integration/autoland/rev/7c447196c23c
Changing inputmode to none should dismiss software keyboard. r=geckoview-reviewers,agi
https://hg.mozilla.org/integration/autoland/rev/133d10dbf4c7
Add composition test when changing inputmode dynamically. r=masayuki
Status: NEW → RESOLVED
Closed: 3 years ago3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 93 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: