Remove highlight delay for FindInPage results out of screen.
In current implementation of find_in_page.js, when user navigates to a match result out of the screen, the orange highlight will be added to it with a 250ms delay. In previous version, the callback invoked after 250ms will always add orange highlight to the current selected match result, and the CL(http://crrev/c/1347363) accidently changed the logic and created a bug. If user clicks "goNext" fast enough, selected match result may get highlighted permanently. However, after deeper investigation, the delayed highlight seems to be buggy from the begining. Navigating backward to a match result that is inside the screen will also meets the condition and trigger the delay, but the 250ms is just too short to be noticed. Besides, why we need the delay is also mysterious, and here is my guess: In ancient time the find_in_page.js do two things, first scroll to the match result and then do the highlight, and somehow UIWebView requires us to add a delay(see the comments in old version code). Then the scrolling work moved from Js into OC, so there are two lines about scrolling that are commented out. Since UX has also confirmed that delay on highlight is not necessary, it should be removed now. Bug: 911611 Change-Id: If0fef219b33954e243e527f3b50dbe836f753ede Reviewed-on: https://chromium-review.googlesource.com/c/1365610Reviewed-by:Peter Lee <pkl@chromium.org> Commit-Queue: Yi Su <mrsuyi@chromium.org> Cr-Commit-Position: refs/heads/master@{#614353}
Showing
Please register or sign in to comment