Closed Bug 899233 Opened 6 years ago Closed 6 years ago

Text input is screwy in textarea


(Firefox for Android :: Keyboards and IME, defect)

Not set



Firefox 26


(Reporter: ted, Assigned: jchen)





(3 files)

Using the testcase in the URL, performing the following steps (see attached video):
1) Type "abcd abcd"
2) Tap in the middle of the typed text to place the cursor there
3) Type "xyz"

Expected results:
Textbox contains "abcd xyzabcd"

Actual results:
Textbox contains "abcd xyz", the typed text overwrote the original text.

This is with the 2013-07-28 Nightly on a Nexus 4 running Android 4.2.2, default Google Keyboard.

I've been seeing some other odd behavior as well but I can't reproduce it as readily, like I tapped in the middle of some text, typed something, then tried to tap at the end to type more there, but the cursor snaps back to the middle of the text when I start typing again.
Oops, forgot to attach the video.
Turns out Android expects us to always tell it about selection changes, except when in extracted mode.
Attachment #789786 - Flags: review?(cpeterson)
When changing selection by tapping, we don't actually need to restart the IME; we just have to show it. We also preserve the IME's states by not restarting it.
Attachment #789789 - Flags: review?(cpeterson)
Comment on attachment 789786 [details] [diff] [review]
Notify InputMethodManager of selection when not in extracted mode (v1)

Review of attachment 789786 [details] [diff] [review]:

LGTM! You might consider adding a comment explaining why extracted text mode is a special case.
Attachment #789786 - Flags: review?(cpeterson) → review+
Comment on attachment 789789 [details] [diff] [review]
Don't restart IME when changing selection (v1)

Review of attachment 789789 [details] [diff] [review]:


::: widget/android/AndroidBridge.h
@@ +126,5 @@
>      enum {
>          // Values for NotifyIME, in addition to values from the Gecko
>          // NotificationToIME enum; use negative values here to prevent conflict
>          NOTIFY_IME_REPLY_EVENT = -1,
> +        NOTIFY_IME_OPEN_VKB = -2,

Please order these enum names by value so AndroidBridge use the same order as GeckoEditableListener.
Attachment #789789 - Flags: review?(cpeterson) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 26
Duplicate of this bug: 899633
You need to log in before you can comment on or make changes to this bug.