Closed Bug 1837931 Opened 11 months ago Closed 2 months ago

Last character is removed unexpectedly when using newer GBoard

Categories

(GeckoView :: IME, defect, P2)

All
Android

Tracking

(firefox125 fixed)

RESOLVED FIXED
125 Branch
Tracking Status
firefox125 --- fixed

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file)

When using Japanese keyboard of GBoard, is is possible to convert "かっこ" with "()" from candidate list. But when using new GBoard beta?, GeckoView will insert "(" instead of "()".

When tracing API calls, GBoard does't insert "()" simply.

  1. inputConnection.beginBatchEdit()
  2. inputConnection.commit("( ", 1)
  3. inputConnection.commit(")", -1)
  4. inputConnection.deleteSurroundingText(0, 1)
  5. inputConnection.endiBatchEdit()

So we need to support this strange steps.

Since GBoard doesn't always use this steps to insert "()", I don't know the trigger when this occurs. Most situation uses commitText("()", 1) only.

When calling InputConnection.commitText multiple times into batch
mode, Gecko may sometime set incorrect selection (caret) position.

Although Gecko's text handling is that text change will also update
selection, Android doesn't want it. But commitText's implementation is
the following

  1. Update selection
  2. Update text
  3. Update selection

Gecko doesn't want 1.'s selection change before changing text. So I
would like to remove 1's to fit with Gecko's text handling.

Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/b4e511378623
text isn't inserted at correct position when calling commitText several times. r=geckoview-reviewers,owlish
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Regressions: 1889508
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: