gecko-dev/mobile
Makoto Kato fc29e1e8e1 Bug 1596920 - Don't set selection on dispatching key event if unnecessary. r=geckoview-reviewers,snorp
Actually we emulate key event (down, press and up) from replace transaction of
`Editable`. When dispatching key press, we always update current caret position.

Most situations is the following.
1. Dispatch keypress
2. Dispatch another keypress
3. Receive merged text/selection change result by 1. and 2.
4. Sync shadow (Java's Editable) text with 3.'s result. It means selection is
   correct position now.
5. Dispatch keypress with correct position.

When this issue occurs, the following situation occurs.
1. Dispatch keypress
2. Dispatch another keypress
3. Receive text/selection change result of 1.
4. Sync shadow (Java's Editable) text with 3.'s result. It means selection is
   old position now.
5. Dispatch another keypress with old position.
6. Receive text/selection change result of 2.
7. Receive text/selection change result of 5.

So when dispatching key press, we shouldn't always update selection if unnecessary.
Because selection range is already often set before dispatching key press.

Differential Revision: https://phabricator.services.mozilla.com/D71179
2020-04-28 14:02:10 +00:00
..
android Bug 1596920 - Don't set selection on dispatching key event if unnecessary. r=geckoview-reviewers,snorp 2020-04-28 14:02:10 +00:00
locales Bug 1620842 - change Firefox for Android bugzilla components to GeckoView. r=snorp 2020-03-17 18:36:33 +00:00
.eslintrc.js Bug 1632922 - use const instead of let - manual fixes. r=snorp 2020-04-24 21:53:19 +00:00