Issue metadata
Sign in to add a comment
|
Selecting HTML select element causes page to scroll to top in webview shell browser |
||||||||||||||||||||||
Issue descriptionThis report will ONLY be viewable by Google. Device name: Nexus 9 Android version: NRD54 Fingerprint: WebView version (from system settings -> Apps -> Android System WebView): 52.0.2743.6 Application: Webview Shell Browser Application version: 1.0 URLs (if applicable): https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select Steps to reproduce: (1) Tap on Select element on page Expected result: Drop down menu appears, page stays at same place Actual result: Drop down menu appears, page has scrolled to the top Issue does not happen in Chrome. Issue does not happen in 51.0.2704.61 Monochrome version.
,
May 25 2016
,
May 26 2016
,
May 26 2016
So this issue is specific to Monochrome or Android N. I tested with Android M and don't see this issue. Here's some details: On Android M (using MOB30M), behavior in m52 back to m44 is the same. When the select menu would drop down past the bottom of screen, then the page jumps up so that the select element is centered on page. On Android N (tried NRD27 and NRD54), tested back to 51.0.2693.0 build, the behavior changed. The page would jump to the top when select is tapped, even if it would not have dropped down past the bottom of screen. This didn't happen all the time, so that's why I thought 51.0.2704.61 was not broken when I tested it.
,
May 26 2016
,
May 26 2016
,
May 27 2016
,
May 27 2016
Does not happen on phones as the select UI is different. Also does not happen in Chrome.
,
May 27 2016
Hello Alex, I don't think this is m51 RBS worthy. First of all, the same version of WebView/MonoChrome (either m51 or m52) works fine on L and M, but not on N. Secondly, this happens on m50 too. I just managed to install 50.0.2661.35 WebView onto NYC RYU, and the issue still reproduces. So even if this a webview issue, it is not a regression. 50.0.2661.35 is the last m50 amineer dropped to Android source tree, by the way. (Later versions of m50 can't be installed on NYC, for some weird reasons. But let's not care about that for now) We'll investigate more to determine the root cause. I'm removing RBS now.
,
May 28 2016
NRC42 is the earliest Android N build that contains an m50 WebView. aluo@ can you flash a tablet with that build and try? I'm suspecting this is somehow caused by Android framework change.
,
May 28 2016
If this does not repro on an older android build, aluo@ - please file a b/ bug and link it back here so that we can track it and mark the status here as ExternalDependency. I'm adding the RB-Stable tag back, because I want to have some way to follow up with the Android team if this is in fact their fault.
,
May 28 2016
(Just documenting the discoveries here) This is the callback that caused webview to scroll to the top once the DropDownList is shown. 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwScrollOffsetManager.onContainerViewOverScrolled(AwScrollOffsetManager.java:213) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwContents$AwViewMethodsImpl.onContainerViewOverScrolled(AwContents.java:3219) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwContents.onContainerViewOverScrolled(AwContents.java:1735) 05-28 00:26:37.272 3880 3880 I hush : at com.android.webview.chromium.WebViewChromium.onOverScrolled(WebViewChromium.java:1667) 05-28 00:26:37.272 3880 3880 I hush : at android.webkit.WebView.onOverScrolled(WebView.java:2513) 05-28 00:26:37.272 3880 3880 I hush : at android.view.View.overScrollBy(View.java:20883) 05-28 00:26:37.272 3880 3880 I hush : at android.webkit.WebView.-wrap2(WebView.java) 05-28 00:26:37.272 3880 3880 I hush : at android.webkit.WebView$PrivateAccess.overScrollBy(WebView.java:2200) 05-28 00:26:37.272 3880 3880 I hush : at com.android.webview.chromium.WebViewChromium$InternalAccessAdapter.overScrollBy(WebViewChromium.java:2276) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwContents$AwScrollOffsetManagerDelegate.overScrollContainerViewBy(AwContents.java:608) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwScrollOffsetManager.scrollBy(AwScrollOffsetManager.java:190) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwScrollOffsetManager.requestChildRectangleOnScreen(AwScrollOffsetManager.java:373) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.android_webview.AwContents.requestChildRectangleOnScreen(AwContents.java:1743) 05-28 00:26:37.272 3880 3880 I hush : at com.android.webview.chromium.WebViewChromium.requestChildRectangleOnScreen(WebViewChromium.java:2041) 05-28 00:26:37.272 3880 3880 I hush : at android.webkit.WebView.requestChildRectangleOnScreen(WebView.java:2604) 05-28 00:26:37.272 3880 3880 I hush : at android.view.View.requestRectangleOnScreen(View.java:5997) 05-28 00:26:37.272 3880 3880 I hush : at android.widget.PopupWindow.findDropDownPosition(PopupWindow.java:1565) 05-28 00:26:37.272 3880 3880 I hush : at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1216) 05-28 00:26:37.272 3880 3880 I hush : at android.widget.ListPopupWindow.show(ListPopupWindow.java:671) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.ui.DropdownPopupWindow.show(DropdownPopupWindow.java:136) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.content.browser.input.SelectPopupDropdown.show(SelectPopupDropdown.java:77) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.content.browser.ContentViewCore.showSelectPopup(ContentViewCore.java:2574) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method) 05-28 00:26:37.272 3880 3880 I hush : at org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:39) 05-28 00:26:37.272 3880 3880 I hush : at android.os.Handler.dispatchMessage(Handler.java:102) 05-28 00:26:37.272 3880 3880 I hush : at android.os.Looper.loop(Looper.java:154) 05-28 00:26:37.272 3880 3880 I hush : at android.app.ActivityThread.main(ActivityThread.java:6018) 05-28 00:26:37.272 3880 3880 I hush : at java.lang.reflect.Method.invoke(Native Method) 05-28 00:26:37.272 3880 3880 I hush : at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:801) 05-28 00:26:37.272 3880 3880 I hush : at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:691)
,
May 28 2016
Thanks Hush, issue does not happen on NRC42, have opened a b/ bug and cc'd everyone. I'll do some more bisecting on Android Tuesday.
,
May 28 2016
,
May 28 2016
When the DropDownPopup is shown, the Android platform calls requestChildRectOnScreen with rect(top=0, left=0, bottom=482, right=295). That's why webview is forced to scroll to top.
,
May 31 2016
External Dependency buganizer bug id is: 29010381
,
Jun 10 2016
Removing external dependency status since we're going to have to fix this in Chrome / WebView. Marking as RB-Stable for M52 since we don't have time to close in M51.
,
Jun 10 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/87634341cb230c465a1d2c5cdb09f79c0a97bc08 commit 87634341cb230c465a1d2c5cdb09f79c0a97bc08 Author: hush <hush@chromium.org> Date: Fri Jun 10 21:35:38 2016 Fix DropdownPopupWindow's position in Android N. In Android N, the framework will read view.getLeft() and view.getTop() to determine where to put the drop down, and if the anchor view is not on screen, the parent view will be scrolled to make it on screen (by means of requestChildRectangleOnScreen). setLayoutParams() is not enough to change left and top values of the anchorView immediately. Show()ing the ListPopupWindow immediately after setLayoutParams() will show the popup window in the wrong location, and also cause the parent view to be improperly scrolled. Call postShow() to put show() after when the layout of the anchor view is changed. Initial selection has to be set after show() is actually called, because getListView() is null until the ListPopupWindow is shown. BUG= 614746 Review-Url: https://codereview.chromium.org/2049523005 Cr-Commit-Position: refs/heads/master@{#399274} [modify] https://crrev.com/87634341cb230c465a1d2c5cdb09f79c0a97bc08/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java [modify] https://crrev.com/87634341cb230c465a1d2c5cdb09f79c0a97bc08/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
,
Jun 10 2016
,
Jun 10 2016
Your change meets the bar and is auto-approved for M52 (branch: 2743)
,
Jun 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/80a41c4e6e833c56f88ba2a4ed755be308e6a66a commit 80a41c4e6e833c56f88ba2a4ed755be308e6a66a Author: Hui Shu <hush@google.com> Date: Fri Jun 10 23:59:12 2016 Fix DropdownPopupWindow's position in Android N. In Android N, the framework will read view.getLeft() and view.getTop() to determine where to put the drop down, and if the anchor view is not on screen, the parent view will be scrolled to make it on screen (by means of requestChildRectangleOnScreen). setLayoutParams() is not enough to change left and top values of the anchorView immediately. Show()ing the ListPopupWindow immediately after setLayoutParams() will show the popup window in the wrong location, and also cause the parent view to be improperly scrolled. Call postShow() to put show() after when the layout of the anchor view is changed. Initial selection has to be set after show() is actually called, because getListView() is null until the ListPopupWindow is shown. BUG= 614746 Review-Url: https://codereview.chromium.org/2049523005 Cr-Commit-Position: refs/heads/master@{#399274} (cherry picked from commit 87634341cb230c465a1d2c5cdb09f79c0a97bc08) Review URL: https://codereview.chromium.org/2057403002 . Cr-Commit-Position: refs/branch-heads/2743@{#323} Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} [modify] https://crrev.com/80a41c4e6e833c56f88ba2a4ed755be308e6a66a/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java [modify] https://crrev.com/80a41c4e6e833c56f88ba2a4ed755be308e6a66a/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
,
Jun 13 2016
,
Jun 13 2016
Issue 607708 has been merged into this issue.
,
Jun 13 2016
Verified issue is fixed on latest M52 and 53 builds on Nexus 9.
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/87634341cb230c465a1d2c5cdb09f79c0a97bc08 commit 87634341cb230c465a1d2c5cdb09f79c0a97bc08 Author: hush <hush@chromium.org> Date: Fri Jun 10 21:35:38 2016 Fix DropdownPopupWindow's position in Android N. In Android N, the framework will read view.getLeft() and view.getTop() to determine where to put the drop down, and if the anchor view is not on screen, the parent view will be scrolled to make it on screen (by means of requestChildRectangleOnScreen). setLayoutParams() is not enough to change left and top values of the anchorView immediately. Show()ing the ListPopupWindow immediately after setLayoutParams() will show the popup window in the wrong location, and also cause the parent view to be improperly scrolled. Call postShow() to put show() after when the layout of the anchor view is changed. Initial selection has to be set after show() is actually called, because getListView() is null until the ListPopupWindow is shown. BUG= 614746 Review-Url: https://codereview.chromium.org/2049523005 Cr-Commit-Position: refs/heads/master@{#399274} [modify] https://crrev.com/87634341cb230c465a1d2c5cdb09f79c0a97bc08/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java [modify] https://crrev.com/87634341cb230c465a1d2c5cdb09f79c0a97bc08/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java
,
Jun 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/80a41c4e6e833c56f88ba2a4ed755be308e6a66a commit 80a41c4e6e833c56f88ba2a4ed755be308e6a66a Author: Hui Shu <hush@google.com> Date: Fri Jun 10 23:59:12 2016 Fix DropdownPopupWindow's position in Android N. In Android N, the framework will read view.getLeft() and view.getTop() to determine where to put the drop down, and if the anchor view is not on screen, the parent view will be scrolled to make it on screen (by means of requestChildRectangleOnScreen). setLayoutParams() is not enough to change left and top values of the anchorView immediately. Show()ing the ListPopupWindow immediately after setLayoutParams() will show the popup window in the wrong location, and also cause the parent view to be improperly scrolled. Call postShow() to put show() after when the layout of the anchor view is changed. Initial selection has to be set after show() is actually called, because getListView() is null until the ListPopupWindow is shown. BUG= 614746 Review-Url: https://codereview.chromium.org/2049523005 Cr-Commit-Position: refs/heads/master@{#399274} (cherry picked from commit 87634341cb230c465a1d2c5cdb09f79c0a97bc08) Review URL: https://codereview.chromium.org/2057403002 . Cr-Commit-Position: refs/branch-heads/2743@{#323} Cr-Branched-From: 2b3ae3b8090361f8af5a611712fc1a5ab2de53cb-refs/heads/master@{#394939} [modify] https://crrev.com/80a41c4e6e833c56f88ba2a4ed755be308e6a66a/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDropdown.java [modify] https://crrev.com/80a41c4e6e833c56f88ba2a4ed755be308e6a66a/ui/android/java/src/org/chromium/ui/DropdownPopupWindow.java |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by sgu...@chromium.org
, May 25 2016