[TTS] Fix tap-far-from-previous suppression.
A tap that's far from the previous tap should generally be ignored, and just dismiss our UI instead of starting a new tap-handling sequence. This CL updates our logic to look at whether there was any selection before the tap rather than whether the previous tap was suppressed. Our old logic ignored whether there was any selection before the tap, and used whether the previous tap was suppressed as a proxy for no-selection. Recent code changes make it fairly easy to determine if there was a selection just before a tap gesture so we use that instead. The difference becomes clear when "invalid taps" are considered. These are taps on non-text characters, e.g. a period or comma. These taps don't select, but they also are not technically suppressed, so a subsequent tap would be ignored. Now any tap that's far from a previous tap will be ignored only if there was a selection before the tap. BUG=713471 Change-Id: Ie94e345a87cf580a3d1993370938982e6e273e89 Reviewed-on: https://chromium-review.googlesource.com/794020Reviewed-by:Theresa <twellington@chromium.org> Commit-Queue: Donn Denman <donnd@chromium.org> Cr-Commit-Position: refs/heads/master@{#520161}
Showing
Please register or sign in to comment