Closed Bug 746657 Opened 12 years ago Closed 3 years ago

Handle ENTER key special case during IME composition in GeckoInputConnection.onTextChanged()

Categories

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

ARM
Android
defect

Tracking

(blocking-fennec1.0 -)

RESOLVED INCOMPLETE
Tracking Status
blocking-fennec1.0 --- -

People

(Reporter: cpeterson, Unassigned)

References

Details

> +            if (changedChar == '\n') {
> +                processKeyDown(KeyEvent.KEYCODE_ENTER, new KeyEvent(KeyEvent.ACTION_DOWN,
> +                                                                    KeyEvent.KEYCODE_ENTER), false);
> +                processKeyUp(KeyEvent.KEYCODE_ENTER, new KeyEvent(KeyEvent.ACTION_UP,
> +                                                                  KeyEvent.KEYCODE_ENTER), false);
> +                return;
> +            }

In GeckoInputConnection.onTextChanged(), the Enter key special case could run during composition. This may cause some bugs in nsEditor.

Masayuki thinks that the first |if| condition should be |changedText.length() == 1 && !hasCompositionString()|. Also, there may be cases when processKeyDown() causes onTextChange() to be reentered.
The ENTER key special case was added to fix bug 721393.
Depends on: 721393
blocking-fennec1.0: --- → ?
cpeterson - can we get a clearer description on what this would break and how badly, so that we can triage it correctly?
I don't think this bug should be a blocker. This bug was just a reminder to clean up some IME code. There is no known misbehavior.
I was playing with the notion to get STRs.
1) go to http://people.mozilla.com/~nhirata/html_tp/NextAction_Bug614356.html
2) set IME to Simeji
3) click in First name field
4) type in hira without committing (ie hitting return)
5) click on the last name field
6) hit return

Expected: clicking on the last name field will commit the first name, hitting return will go to the next field
Actual: hitting return commits what was typed in the first name field in the last name field as well.
nhirata, I think you have found a different bug. Can you open a new bug for that issue? Also, replace your step #6 with "enter more characters after clicking input focus to 'Last name' field" then the uncommitted composition string from "First name" will continue will in "Last name".
blocking-fennec1.0: ? → -
Priority: -- → P4
Assignee: cpeterson → nobody
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.