Range.getClientRects return wrong rect position after WebView scroll horizontally
Reported by
s704...@gmail.com,
Mar 6 2017
|
||||||
Issue descriptionSteps to reproduce the problem: 1. WebView load a long content by using loadDataWithBaseURL API. 2. I add a CSS rule to set multi column width and height to fit screen after I receive WebView onPageFinished callback. 3. Now it can be scrolled horizontally and look likes good. 4. I long touch the content and trigger Android selection and then use javascript to get the range like this: var selection = window.getSelection(); var range = selection.getRangeAt(0); var rects = range.getClientRects(); 5. I got the wrong rect position when WebView scroll horizontally. What is the expected behavior? I reset the System WebView to version 37 ( 1602158-arm ) on Android 5.0 device. The range.getClientRects is correct. If my screen width is 650 dp and it has 5 pages after multi column. The rect of each page should like this: page index 0: 0~650 page index 1: 650~1300 page index 2: 1300~1950 page index 3: 1950~2600 page index 4: 2600~3250 What went wrong? Now I got the wrong rects like this: The rect of each page should like this: page index 0: 0~650 page index 1: 650~1300 page index 2: 2400~3050 page index 3: 4550~5200 page index 4: 6250~6900 Did this work before? N/A Chrome version: 56.0.2924.87 Channel: stable OS Version: android 5.0 and 6.0 Flash Version:
,
Mar 7 2017
,
May 10 2017
s70487s@, could you please provide a compiled test apk for this? Which versions of WebView do you see this working for? And which versions do you see it broken for?
,
Oct 4 2017
,
Oct 4
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Oct 5
,
Oct 11
As already noted in comment #3 by ntfschr@, it looks like we need more information, e.g. provide sample HTML/CSS input where this issue happens, and the webview version. Does this happen with a recent WebView version? Version 37 mentioned on the issue seems a long way back.. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by dtapu...@chromium.org
, Mar 6 2017