Fix ScrollFocusedEditableIntoView for selections
This method is used to scroll and zoom an editable element into view and to a legible scale. This generally happens on Android where the on-screen keyboard appears and the input box is zoomed into the viewport. The linked bug occurs because we try to zoom the input box while it has a selection (e.g Ctrl-A the text) rather than a blinking caret. This method would then receive an empty rect for the caret_rect which would cause us to zoom into the maximum possible scale. The fix here is to fallback to the selection rect if there is no carret. Bug: 968638 Change-Id: I980183bf9843192e694579cf2af4af816b78a090 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1642248Reviewed-by:Stefan Zager <szager@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#666493}
Showing
Please register or sign in to comment