New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 667667 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 620929
Owner: ----
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Range getClientRects API returns wrong values after changing system display size

Reported by lge-systemwebview@lge.com, Nov 22 2016

Issue description

THIS TEMPLATE IS FOR FILING BUGS ON THE ANDROID SYSTEM WEBVIEW. GENERAL WEB
BUGS SHOULD BE FILED USING A DIFFERENT TEMPLATE!

Device name: Any 7.0 Device(LG G5/Nexus/Pixel)
Android version:7.0 Nougat
WebView version (from system settings -> Apps -> Android System WebView):54.0.2840.68
Application: Propritery
Application version:

URLs (if applicable):



Steps to reproduce:

getClientRects API is returning wrong values when display size is changed.

Scenario:
1. Launch the sample app -> minimize the app->system settings-> Display-> More->Display size-> Change to very small

2. Reopen the app from Recent apps window-> Now type character after the image-> Observe rect top value from the logs (search for "rect top" string in the logcat)

3. Now clear the sample app from history -> Again launch the app -> Now type character after the image-> Observe rect top value from the logs (search for "rect top" string in the logcat)

rect top value from getClientRects is giving wrong values when app is not launched fresh after changing the display size.

Expected result: 

getClientRects should give proper values after changing the display size settings and then reopening from recent apps 


Actual result:

etClientRects is giving wrong coordinate values after changing the display size settings and then reopening from recent apps.

Code snippet used:

var sel = window.getSelection();
var range = sel.getRangeAt(0);
var caretRect = range.getClientRects();
console.log("rect top : " + caretRect[0].top);
 
Attached sample app APK and source code
WebViewSampleApp.apk
5.9 MB Download
SampleApp_Source.zip
4.7 MB Download

Comment 3 by boliu@chromium.org, Nov 22 2016

Cc: ti...@chromium.org
webview doesn't support the new N feature that changes display size yet, Tima is working on it

until webview supports it, apps can restart the activity when display changes
Mergedinto: 620929
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment