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

Issue 785791 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Text selection handles disappear after screen rotation

Reported by yan...@gmail.com, Nov 16 2017

Issue description

Steps to reproduce the problem:
1. keep smart phone screen portrait,enter webpage http://mini.eastday.com/mobile/171116051519408.html?qid=sgdhtt
2. scroll to top and select characters "查处酒驾", then handler and menu appears
3. rotate screen to landscape, wait for the handle and menu redrawed.
4. rotate screen to portrait, see handler(s) dismissed, but it can drag.

What is the expected behavior?
the handler(s) can appears.

What went wrong?
This is a bug on Android webview, i think what's wrong is about handle state refresh order during screen rotation. 

Did this work before? No 

Chrome version: 64.0.3269  Channel: dev
OS Version: 5.0
Flash Version: 

during screen ratation, TouchSelectionController::OnSelectionChanged called, the handler attribute refresh order is SetFocus,SetOrientation,SetVisible,UpdateHandleLayoutIfNecessary, setOrigin is called at the last call.
handler is a PopupTouchHandleDrawable object that controlled by native code.
I found that during setVisible, isPositionVisible will be called, by the params are not the newest values due to setVisible called before setOrigin().
 
Screenshot_2017-11-16_102618.jpg
113 KB View Download
Labels: Needs-triage-Mobile

Comment 2 by yan...@gmail.com, Nov 17 2017

well, in my test, nexus 4 used.
Cc: pnangunoori@chromium.org
Labels: Triaged-Mobile Needs-Feedback
Tested the issue in Android and not able to reproduce the issue.

Steps Followed:
1. Launched Chrome browser in portrait mode..
2. Navigated to the URL 'http://mini.eastday.com/mobile/171116051519408.html?qid=sgdhtt'
3. Selected the characters "查处酒驾".
4. Rotate device to landscape mode and wait for some time.
5. Rotate device back to portrait mode.
6. Observed that hangers for the text are displayed as displayed in step-2.

Chrome versions tested:
62.0.3202.84 (Stable), 63.0.32329.41 (Beta), 64.0.3270.2(Canary), 64.0.3269.0

OS:
Android 8.0.0, Android 5.0.2

Android Devices:
Pixel Build/0PR6.170623.023, Nexus 4 Build/LRX220

@yanpqi -- Could you please disable and enable Chrome. You can also try by updating your Chrome Canary to latest version #64.0.3270.2 and let us know your observations.

Thanks in advance.

Comment 4 by yan...@gmail.com, Nov 20 2017

You can reproduce this issue on Android WebView TestShell.
Build chromium sources code by" ninja -C out/Default webview_instrumentation_apk ".
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 20 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "pnangunoori@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: TE-NeedsTriageHelp
Cc: ctzsm@chromium.org
Components: -UI Blink>Editing>Selection Mobile>WebView
Labels: -TE-NeedsTriageHelp -Needs-triage-Mobile
Summary: Text selection handles disappear after screen rotation (was: [SelectionHandler]: selection handler can not display in some after some operation.)
Cc: sandeepkumars@chromium.org amaralp@chromium.org
 Issue 800189  has been merged into this issue.
Owner: amaralp@chromium.org
passing to amaralp@ given his investigation with ctzsm@
Status: Assigned (was: Unconfirmed)
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 17 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d0d733cd1ad86ba812c717152a40d3bd6372c88

commit 7d0d733cd1ad86ba812c717152a40d3bd6372c88
Author: Jinsong Fan <fanjinsong@sogou-inc.com>
Date: Wed Jan 17 16:48:35 2018

AW: Fix Text selection handles disappear after screen rotation

When rotation has changed, PopupTouchHandleDrawable uses the old
mOriginX/YDip to update visibility before calling setOrigin(). The CL
always call scheduleInvalidate() regardless of the current visibility
after screen rotation.

Bug:  785791 
Change-Id: Icf60c0a18c2b9ca7b7b013873eee40ed1d7d0f3e
Reviewed-on: https://chromium-review.googlesource.com/858718
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: Tobias Sargeant <tobiasjs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529769}
[modify] https://crrev.com/7d0d733cd1ad86ba812c717152a40d3bd6372c88/android_webview/java/src/org/chromium/android_webview/PopupTouchHandleDrawable.java

Status: Fixed (was: Assigned)
verified with 65.0.3324.0 on Pixel 2 / OPD3

Sign in to add a comment