xamarin / Xamarin.Forms

Xamarin.Forms is no longer supported. Migrate your apps to .NET MAUI.
https://aka.ms/xamarin-upgrade
Other
5.63k stars 1.88k forks source link

[Bug] Webview does not scroll content on Android SDK 31, works fine on UWP and iOS #15184

Open norton287 opened 2 years ago

norton287 commented 2 years ago

Description

Unable to scroll content in the Webview control on Android SDK 31, works fine on iOS and UWP though

Steps to Reproduce

  1. Create a webview control with any source
  2. load enough content that should force the view to be scrollable
  3. when it should become scrollable on SDK 31 it is just locked solid

Expected Behavior

Content should become scrollable when it fills past the view

Actual Behavior

Contant stays static and unscrollable, can load new content but cannot scroll back up to see previous webview content.

Basic Information

Environment

Show/Hide Visual Studio info ``` Microsoft Visual Studio Enterprise 2022 Version 17.0.6 VisualStudio.17.Release/17.0.6+32126.317 Microsoft .NET Framework Version 4.8.04161 Installed Version: Enterprise Visual C++ 2022 00482-10000-00261-AA779 Microsoft Visual C++ 2022 ADL Tools Service Provider 1.0 This package contains services used by Data Lake tools ASA Service Provider 1.0 ASP.NET and Web Tools 2019 17.0.796.18217 ASP.NET and Web Tools 2019 ASP.NET Web Frameworks and Tools 2019 17.0.796.18217 For additional information, visit https://www.asp.net/ Azure App Service Tools v3.0.0 17.0.796.18217 Azure App Service Tools v3.0.0 Azure Data Lake Tools for Visual Studio 2.6.4000.0 Microsoft Azure Data Lake Tools for Visual Studio Azure Functions and Web Jobs Tools 17.0.796.18217 Azure Functions and Web Jobs Tools Azure Stream Analytics Tools for Visual Studio 2.6.4000.0 Microsoft Azure Stream Analytics Tools for Visual Studio C# Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools. Cookiecutter 17.0.21293.2 Provides tools for finding, instantiating and customizing templates in cookiecutter format. Extensibility Message Bus 1.2.6 (master@34d6af2) Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration. Fabric.DiagnosticEvents 1.0 Fabric Diagnostic Events Microsoft Azure Hive Query Language Service 2.6.4000.0 Language service for Hive query Microsoft Azure Service Fabric Tools for Visual Studio 17.0 Microsoft Azure Service Fabric Tools for Visual Studio Microsoft Azure Stream Analytics Language Service 2.6.4000.0 Language service for Azure Stream Analytics Microsoft Azure Tools for Visual Studio 2.9 Support for Azure Cloud Services projects Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines Microsoft Library Manager 2.1.134+45632ee938.RR Install client-side libraries easily to any web project Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards Microsoft Visual Studio Tools for Containers 1.2 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container. Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package Mono Debugging for Visual Studio 17.0.11 (54f19d2) Support for debugging Mono processes with Visual Studio. NuGet Package Manager 6.0.1 NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/ ProjectServicesPackage Extension 1.0 ProjectServicesPackage Visual Studio Extension Detailed Info Python - Django support 17.0.21293.2 Provides templates and integration for the Django web framework. Python - Profiling support 17.0.21293.2 Profiling support for Python projects. Python with Pylance 17.0.21293.2 Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers. Razor (ASP.NET Core) 17.0.0.2156603+e9cd763349a080127b6519ffbec0123949a4c385 Provides languages services for ASP.NET Core Razor. ResX Resource Manager ResXManager Manage localization of all ResX-based resources in one place. Shows all resources of a solution and lets you edit the strings and their localizations in a well-arranged data grid. Snapshot Debugging Extension 1.0 Snapshot Debugging Visual Studio Extension Detailed Info SQL Server Data Tools 17.0.62110.20190 Microsoft SQL Server Data Tools Test Adapter for Boost.Test 1.0 Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory. Test Adapter for Google Test 1.0 Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory. ToolWindowHostedEditor 1.0 Hosting json editor into a tool window TypeScript Tools 17.0.1001.2002 TypeScript Tools for Microsoft Visual Studio Visual Basic Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used. Visual F# Tools 17.0.0-beta.21522.2+6d626ff0752a77d339f609b4d361787dc9ca93a5 Microsoft Visual F# Tools Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio Visual Studio Container Tools Extensions 1.0 View, manage, and diagnose containers within Visual Studio. Visual Studio IntelliCode 2.2 AI-assisted development for Visual Studio. Visual Studio Tools for CMake 1.0 Visual Studio Tools for CMake Visual Studio Tools for Containers 1.0 Visual Studio Tools for Containers VisualStudio.DeviceLog 1.0 Information about my package VisualStudio.Mac 1.0 Mac Extension for Visual Studio Xamarin 17.0.0.343 (d17-0@fb07a17) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android. Xamarin Designer 17.0.0.183 (remotes/origin/d17-0@a351f0f1f) Visual Studio extension to enable Xamarin Designer tools in Visual Studio. Xamarin Templates 17.0.17 (9e779b0) Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms. Xamarin.Android SDK 12.1.0.5 (d17-0/6b0e6b2) Xamarin.Android Reference Assemblies and MSBuild support. Mono: c633fe9 Java.Interop: xamarin/java.interop/d17-0@febb1367 ProGuard: Guardsquare/proguard/v7.0.1@912d149 SQLite: xamarin/sqlite/3.36.0@a575761 Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-0@a5194e9 Xamarin.iOS and Xamarin.Mac SDK 15.4.0.0 (8fc41ae82) Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support. ```

Build Logs

Screenshots

Reproduction Link

Workaround

Haven't found one yet, will be trying earlier SDKs to see if the issue is there as well later today and tomorrow.

jfversluis commented 2 years ago

Thanks for the report @norton287 did you get around to testing other SDKs?

norton287 commented 2 years ago

I tested SDK 29 & 30 and it occurs there as well

John

From: Gerald Versluis @.**@.) Reply: xamarin/Xamarin.Forms @.**@.) Date: March 2, 2022 at 6:45:45 AM To: xamarin/Xamarin.Forms @.**@.) CC: John Norton @.**@.), Mention @.**@.) Subject: Re: [xamarin/Xamarin.Forms] [Bug] Webview does not scroll content on Android SDK 31, works fine on UWP and iOS (Issue #15184)

Thanks for the report @norton287(https://github.com/norton287) did you get around to testing other SDKs?

— Reply to this email directly, view it on GitHub(https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1056890329), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AKBF5PD6FPBF52TEY4HLYZ3U55PHTANCNFSM5PQYVG2Q). Triage notifications on the go with GitHub Mobile for iOS(https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android(https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub). You are receiving this because you were mentioned.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1056890329", "url": "https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1056890329", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

jfversluis commented 2 years ago

Would you be able to provide a reproduction sample of this? Because I don't seem to be able to get this behavior in my test

norton287 commented 2 years ago

Give me an email and I can send my solution to you. I think it may be the url I is wrapped in an iframe.

John

From: Gerald Versluis @.**@.) Reply: xamarin/Xamarin.Forms @.**@.) Date: March 3, 2022 at 6:15:50 AM To: xamarin/Xamarin.Forms @.**@.) CC: John Norton @.**@.), Mention @.**@.) Subject: Re: [xamarin/Xamarin.Forms] [Bug] Webview does not scroll content on Android SDK 31, works fine on UWP and iOS (Issue #15184)

Would you be able to provide a reproduction sample of this? Because I don't seem to be able to get this behavior in my test

— Reply to this email directly, view it on GitHub(https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1057984115), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AKBF5PBKE4SAWBXAKEWUBCDU6CUPNANCNFSM5PQYVG2Q). Triage notifications on the go with GitHub Mobile for iOS(https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android(https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub). You are receiving this because you were mentioned.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1057984115", "url": "https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1057984115", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

norton287 commented 2 years ago

@jfversluis a little more background...

The url is for an azure chat bot, to get around rendering issues on iPhone they wrapped the end point in an iframe.

norton287 commented 2 years ago

@jfversluis haven't thought about it but after I get out of class this morning I will remove the URL from the iframe for Android and see what happens.

jfversluis commented 2 years ago

Unfortunately I can't look at any private code, if you want to share something it has to preferably be on a public (GitHub) repo :) Let me know what you find!

norton287 commented 2 years ago

Stripping out the URL from the frame of the web chat bot does not work. It does the same thing.

In order for you to test your are going to have to setup a web chat bot and test with the endpoint url they give you.

Or you can use mine if you want, just cannot release it public as the potential for abuse.

John

From: Gerald Versluis @.**@.) Reply: xamarin/Xamarin.Forms @.**@.) Date: March 3, 2022 at 7:54:19 AM To: xamarin/Xamarin.Forms @.**@.) CC: John Norton @.**@.), Mention @.**@.) Subject: Re: [xamarin/Xamarin.Forms] [Bug] Webview does not scroll content on Android SDK 31, works fine on UWP and iOS (Issue #15184)

Unfortunately I can't look at any private code, if you want to share something it has to preferably be on a public (GitHub) repo :) Let me know what you find!

— Reply to this email directly, view it on GitHub(https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1058063684), or unsubscribe(https://github.com/notifications/unsubscribe-auth/AKBF5PETSSGMI3H3TTTLEPDU6DAAXANCNFSM5PQYVG2Q). Triage notifications on the go with GitHub Mobile for iOS(https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675) or Android(https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub). You are receiving this because you were mentioned.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1058063684", "url": "https://github.com/xamarin/Xamarin.Forms/issues/15184#issuecomment-1058063684", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

norton287 commented 2 years ago

@jfversluis I can share the URL endpoint with you for your source in a demo you create but I cannot publish it as it is an item that can rack up a lot of money in a short time if misused and spread around. Otherwise, you need to go to the portal and set up a simple chatbot and try it out.

norton287 commented 2 years ago

@jfversluis Added you as a collaborator to the repo, you can extract the URL from the About.xaml.cs file under Views in the repo to test with.

John

jfversluis commented 2 years ago

@norton287 as mentioned, unfortunately I can't look at private/proprietary code without all kinds of thing that need to be arranged for that. Sorry. Additionally, I don't want to ship it off as "not our problem" but it seems that our WebView is working fine and the problem lies in how the page is constructed. How does it behave if you go to that URL in the regular web browser on that device? I expect it to show the exact same behavior.

norton287 commented 2 years ago

@jfversluis The issue is that it will not scroll if the page that the webview is located on is wrapped in a ScrollView. Removing the scrollview allows the webview to scroll. The tag only affects Android. So there's the problem.