mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
fc29e1e8e1
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 |
||
---|---|---|
.. | ||
android | ||
locales | ||
.eslintrc.js |