Fix degraded typing feedback
- EditableTextBase's state transitions that detect insertions are unreliable: 1. when typing quickly, Chrome can and does combine events. type the keys 1, 2, 3 quickly and you might get value/text changes for "1", "12", and "123"; or you might get value changes for "1", "123". The latter is really bad and triggers the insertion (with length > 1) state erroniously. 2. the source of the insertion is unclear. It might have been from a paste, programmatic splicing. 3. It is impossible to reconstruct what part of the text actually got inserted. Trivial example: 'aaa', 'aaaaaaaa'. Unknown whether the entire value was replaced, or just a substring. In this change, we will turn off insertion announcements, which were being triggered in many undesirable code paths. Instead, we will: - listen to clipboard events for cut, copy, paste (and remove the previous copy command) - fixes the regression introduced by splitting text field into several subroles. Set selection wasn't working. Test: type a lot with various typing echo settings and cut/copy/paste. Bug: 791157 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ida442aa0656c1d66e489c6064f8959ccb7177b46 Reviewed-on: https://chromium-review.googlesource.com/804535 Commit-Queue: David Tseng <dtseng@chromium.org> Reviewed-by:Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#521793}
Showing
Please register or sign in to comment