Fix: WebView inside SwipeView not responding to swipe gestures on Android - #36231
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36231Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36231" |
|
Hey there @@SubhikshaSf4851! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Fixes an Android regression where a WebView hosted inside a SwipeView stops allowing swipe gestures to be recognized by the SwipeView, by adjusting Android touch-interception behavior and adding a regression UI test.
Changes:
- Android: cache whether
MauiWebViewis hosted under aMauiSwipeViewand avoidRequestDisallowInterceptTouchEvent(true)in that scenario. - Android: add WebView-specific edge/scroll checks in
MauiSwipeViewinterception logic to decide when theSwipeViewshould intercept vs. allow theWebViewto handle scrolling. - Tests: add a new Issue UI test/page for #36154 and register the new Android override in PublicAPI.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt | Records the new MauiWebView.OnDetachedFromWindow() override in the net-android public API surface. |
| src/Core/src/Platform/Android/MauiWebView.cs | Avoids disallow-intercept behavior when the WebView is under a SwipeView (prevents blocking SwipeView gestures). |
| src/Core/src/Platform/Android/MauiSwipeView.cs | Adds WebView-specific interception logic based on WebView scrollability at the swipe edge. |
| src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue36154.cs | Adds a regression UI test for swiping on a WebView inside a SwipeView. |
| src/Controls/tests/TestCases.HostApp/Issues/Issue36154.cs | Adds the corresponding HostApp issue page used by the UI test. |
MauiBot
left a comment
There was a problem hiding this comment.
AI Review Summary
@SubhikshaSf4851 — new AI review results are available based on this last commit:
335eee7. To request a fresh review after new comments or commits, comment/review rerun.
🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix
Gate Result: ✅ PASSED
Platform: ANDROID · Base: main · Merge base: 6e107357
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue36154 Issue36154 |
✅ FAIL — 1087s | ✅ PASS — 839s |
🔴 Without fix — 🖥️ Issue36154: FAIL ✅ · 1087s
(truncated to last 15,000 chars)
cts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:10:00.15
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Starting: Intent { act=android.settings.SETTINGS }
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 1.49 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 32 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 6.75 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 8.35 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 3 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 412 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.66 sec).
5 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
�[38;5;94m[927bd4e5]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;208m[6b7658b0]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;225m[9b08fd20]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;46m[c220757f]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;74m[e526ab92]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;82m[f6f28c50]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;145m[db231faf]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;125m[ec0aec82]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;221m[a79936ee]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
�[38;5;142m[4d13f00b]�[0m�[38;5;160m[Logcat]�[0m Logcat terminated with code 1, signal null
>>>>> 06/30/2026 14:48:01 The SaveDeviceDiagnosticInfo threw an exception during Issue36154(Android).
Exception details: System.InvalidOperationException: Call InitialSetup before accessing the App property.
at UITest.Appium.NUnit.UITestContextBase.get_App() in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 32
at UITest.Appium.NUnit.UITestBase.SaveDeviceDiagnosticInfo(String note, Boolean storeForReattachment) in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 255
TearDown failed for test fixture Microsoft.Maui.TestCases.Tests.Issues.Issue36154(Android)
OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/usr/local/lib/android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install -r --no-incremental /home/vsts/work/1/s/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v7.4.1.apk' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'uiautomator2ServerInstallTimeout' capability
TearDown : System.InvalidOperationException : Call InitialSetup before accessing the App property.
StackTrace: at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.Android.AndroidDriver..ctor(Uri remoteAddress, DriverOptions driverOptions)
at UITest.Appium.AppiumAndroidApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumAndroidApp.cs:line 11
at UITest.Appium.AppiumAndroidApp.CreateAndroidApp(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumAndroidApp.cs:line 41
at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 42
at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
--TearDown
at UITest.Appium.NUnit.UITestContextBase.get_App() in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 32
at UITest.Appium.NUnit.UITestBase.OneTimeTearDown() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 244
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.12] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.76] Discovered: Controls.TestCases.Android.Tests
Failed Issue36154SwipeViewShouldRevealItems [4 m 29 s]
Error Message:
OneTimeSetUp: OpenQA.Selenium.UnknownErrorException : An unknown server-side error occurred while processing the command. Original error: Error executing adbExec. Original error: 'Command '/usr/local/lib/android/sdk/platform-tools/adb -P 5037 -s emulator-5554 install -r --no-incremental /home/vsts/work/1/s/.appium/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v7.4.1.apk' timed out after 20000ms'. Try to increase the 20000ms adb execution timeout represented by 'uiautomator2ServerInstallTimeout' capability
Stack Trace:
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.ExecuteAsync(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities capabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout, AppiumClientConfig clientConfig)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.Android.AndroidDriver..ctor(Uri remoteAddress, DriverOptions driverOptions)
at UITest.Appium.AppiumAndroidApp..ctor(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumAndroidApp.cs:line 11
at UITest.Appium.AppiumAndroidApp.CreateAndroidApp(Uri remoteAddress, IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumAndroidApp.cs:line 41
at UITest.Appium.AppiumServerContext.CreateUIClientContext(IConfig config) in /_/src/TestUtils/src/UITest.Appium/AppiumServerContext.cs:line 42
at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context, Boolean reset) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 77
at UITest.Appium.NUnit.UITestContextBase.InitialSetup(IServerContext context) in /_/src/TestUtils/src/UITest.NUnit/UITestContextBase.cs:line 55
at UITest.Appium.NUnit.UITestBase.OneTimeSetup() in /_/src/TestUtils/src/UITest.NUnit/UITestBase.cs:line 215
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue36154.trx
Total tests: 1
Failed: 1
Test Run Failed.
Total time: 4.6816 Minutes
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue36154.trx
🟢 With fix — 🖥️ Issue36154: PASS ✅ · 839s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:11:43.61
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Starting: Intent { act=android.settings.SETTINGS }
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.90-ci+azdo.14529323
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 1 of 1 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 06/30/2026 15:01:46 FixtureSetup for Issue36154(Android)
>>>>> 06/30/2026 15:01:49 Issue36154SwipeViewShouldRevealItems Start
>>>>> 06/30/2026 15:01:55 Issue36154SwipeViewShouldRevealItems Stop
Passed Issue36154SwipeViewShouldRevealItems [5 s]
NUnit Adapter 4.5.0.0: Test execution complete
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.15] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.66] Discovered: Controls.TestCases.Android.Tests
Results File: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue36154.trx
Test Run Successful.
Total tests: 1
Passed: 1
Total time: 29.8133 Seconds
>>> TRX_RESULT_FILE: /home/vsts/work/1/s/CustomAgentLogsTmp/UITests/TestResults/Issue36154.trx
📁 Fix files reverted (3 files)
src/Core/src/Platform/Android/MauiSwipeView.cssrc/Core/src/Platform/Android/MauiWebView.cssrc/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt
📱 UI Tests — SwipeView,ViewBaseTests
Detected UI test categories: SwipeView,ViewBaseTests
✅ Deep UI tests — 191 passed, 0 failed across 2 categories on platform-pool agent (replaces in-process counts above).
🧪 UI Test Execution Results (deep, platform pool)
| Category | Tests | Snapshot diffs |
|---|---|---|
SwipeView |
73/73 ✓ | — |
ViewBaseTests |
118/119 ✓ | — |
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs) |
📋 Pre-Flight — Context & Validation
Issue: #36154 - WebView inside SwipeView no longer responds to swipe gestures on Android
PR: #36231 - Android WebView inside SwipeView gesture fix
Platforms Affected: Android
Files Changed: 3 implementation/API, 2 test
Key Findings
- PR branch is available locally as
pr-review-36231; GitHub CLI is unauthenticated, so PR body/comments/reviews and required checks could not be fetched from GitHub. - Gate artifact already exists and reports the Issue36154 Android UI test fails without the fix and passes with the PR fix; per instructions, gate was not re-run.
- Current PR fix changes
MauiWebView.OnTouchEventto stop disallowing parent interception when attached underMauiSwipeView, and adds direction-aware WebView edge checks inMauiSwipeView. - Added UI coverage is Android-only and targets
UITestCategories.SwipeView. - Regression cross-reference artifact reports no labeled recent bug-fix risks in modified files.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 0 | Suggestions: 0
Key code review findings:
- ✗
src/Core/src/Platform/Android/MauiSwipeView.cs:136— Direction-aware WebView logic only applies when_contentViewis directly anAndroid.Webkit.WebView. Wrapped WebViews, such as when MAUI insertsWrapperViewfor shadow/border/clip, fall through to genericViewGrouphandling and lose the new directional edge check.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #36231 | Suppress MauiWebView disallow-intercept requests while under MauiSwipeView; add direct-WebView direction-aware edge checks in MauiSwipeView. |
✅ PASSED (Gate) | MauiWebView.cs, MauiSwipeView.cs, UI test files, PublicAPI |
Original PR; gate evidence says fail-without/pass-with-fix. |
🔬 Code Review — Deep Analysis
Code Review — PR #36231
Independent Assessment
What this changes: Android WebView touch interception is relaxed when inside MauiSwipeView, and MauiSwipeView adds direction-aware direct-WebView edge handling. Adds an Android UI regression test.
Inferred motivation: Let SwipeView gestures work when its content is a WebView without permanently blocking WebView scrolling.
Reconciliation with PR Narrative
Author claims: Could not fetch PR description because gh is unauthenticated. Local issue/test names indicate the claim is "WebView inside SwipeView no longer responds to swipe gestures on Android."
Agreement/disagreement: The direct WebView scenario matches, but the implementation appears incomplete for wrapped WebViews.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
| Wrapped WebViews still use non-direction-aware interception | Local expert finding artifact | ❌ Unresolved in PR diff | CustomAgentLogsTmp/PRState/36231/PRAgent/inline-findings-pr36231-local-review.json flags MauiSwipeView.cs:136; local source confirms nested AWebView still routes to the generic ViewGroup,bool overload. |
| Unknown external review findings | GitHub review surfaces unavailable | Cannot determine | gh requires authentication in this environment. Confidence capped low. |
Blast Radius Assessment
- Runs for all instances: Yes — affects Android
MauiWebView.OnTouchEventand AndroidMauiSwipeViewinterception for all WebViews/SwipeViews. - Startup impact: No.
- Static/shared state: No.
CI Status
- Required-check result: undetermined
- Classification: tool unavailable / auth blocker
- Action taken:
gh pr checks --requiredcould not run becauseghrequires authentication; confidence capped low. Gate artifact was already completed separately and was not re-run.
Findings
❌ Error — Wrapped WebViews still use non-direction-aware interception
src/Core/src/Platform/Android/MauiSwipeView.cs:136
The new direction-aware WebView logic only runs when _contentView is directly an AWebView. But MAUI may wrap platform views in WrapperView via ViewHandler<TVirtualView,TPlatformView>.SetupContainer, and MauiWebView itself references the WrapperView case. In that scenario, _contentView is the wrapper, the nested AWebView reaches case AWebView webView, and the code calls ShouldInterceptScrollChildrenTouch(webView, isHorizontal) instead of ShouldInterceptWebViewTouch(webView, swipeDirection).
Concrete failure: a wrapped WebView inside a SwipeView can use the generic vertical/horizontal check and lose direction-specific edge behavior. Route nested AWebView through ShouldInterceptWebViewTouch(webView, swipeDirection) or otherwise unwrap before applying WebView logic.
Failure-Mode Probing
- Direct WebView content: Uses
ShouldInterceptWebViewTouch; edge-aware behavior is sound. - Wrapped WebView content: Misses the new direct branch and uses generic
ViewGrouplogic; direction can be wrong. - No matching swipe items:
GetSwipeItemsByDirectionreturns null/empty, soMauiSwipeViewdoes not intercept. - Detach/reattach:
_hasSwipeViewParentresets on detach and recomputes on attach; no accumulation seen.
Verdict: NEEDS_CHANGES
Confidence: low (Android platform touch plumbing plus GitHub CI/review surfaces unavailable due auth blocker)
Summary: The PR fix covers the direct WebView case and has gate evidence, but wrapped Android WebViews remain incorrectly handled. Alternative candidates should avoid relying solely on direct _contentView is AWebView detection.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix | Parent-owned arbitration: MauiSwipeView ignores WebView disallow-intercept requests and applies WebView edge checks itself. |
✅ PASS | MauiSwipeView.cs, PublicAPI.Unshipped.txt |
Passed Issue36154; fixes wrapped-WebView concern but is larger, adds a public override, and adds recursive hot-path target detection. Full diff: ../try-fix-1/fix.diff. |
| 2 | try-fix | WebView-owned direction-aware release, but without initial ACTION_DOWN disallow-intercept when inside SwipeView. |
❌ FAIL | MauiWebView.cs |
UI test passed, but expert review found Android ordering flaw: parent can steal first MOVE before WebView decides. Full diff: ../try-fix-2/fix.diff. |
| 3 | try-fix | WebView-owned directional release after initial capture: preserve ACTION_DOWN disallow, release on MOVE only at WebView edges. |
✅ PASS | MauiWebView.cs |
Passed Issue36154 and follow-up expert review returned clean. Full diff: ../try-fix-3/fix.diff. |
| PR | PR #36231 | Suppress WebView disallow-intercept while under SwipeView; add direct-WebView edge checks in SwipeView. | ✅ PASSED (Gate) | MauiWebView.cs, MauiSwipeView.cs, PublicAPI, UI tests |
Original PR passed gate but pre-flight review found wrapped-WebView gap in SwipeView's direct-only WebView handling. |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| maui-expert-reviewer | 1 | Yes | Candidate 2's passing test was insufficient because skipping ACTION_DOWN disallow lets SwipeView steal the first move from scrollable WebViews. |
| maui-expert-reviewer | 2 | No blocking findings | Candidate 3 keeps ACTION_DOWN capture and dynamically releases at WebView edges; expert review returned []. |
Exhausted: No — stopped because Candidate #3 passed the Android regression test and expert review, and is meaningfully better than the PR fix.
Selected Fix: Candidate #3 — it is one-file, avoids new public API and cached parent state, handles wrapped WebViews because the logic lives in MauiWebView, and preserves WebView scrolling by keeping Android's initial disallow-intercept handshake.
📝 Recommended PR Title & Description
Assessment: ✏️ Recommend updating — the current metadata accurately describes the raw PR, but the winning fix is try-fix-3, which moves the final arbitration into MauiWebView instead of changing MauiSwipeView and no longer requires the OnDetachedFromWindow PublicAPI entry.
Recommended title
[Android] WebView: Release SwipeView interception only at scroll edges
Recommended description
This PR fixes a regression introduced in #33133 where a `WebView` inside a `SwipeView` on Android stopped responding to swipe gestures.
### Description of Change
**Android platform fix for WebView inside SwipeView:**
- #33133 added an unconditional `Parent?.RequestDisallowInterceptTouchEvent(true)` call on every `Down`/`Move` event. When a `WebView` is inside a `SwipeView`, this can set `FLAG_DISALLOW_INTERCEPT` on the `SwipeView`, causing Android to bypass `OnInterceptTouchEvent` for `Move` events so the `SwipeView` never detects a swipe.
- The fix keeps the initial `ACTION_DOWN` disallow-intercept request so Android parents cannot steal the first move before the WebView receives it.
- On later `MOVE` events, when the `WebView` is inside `MauiSwipeView`, the WebView uses the initial touch point and current gesture direction with `CanScrollHorizontally` / `CanScrollVertically` to decide whether to keep the gesture or release parent interception.
- The `SwipeView` can now intercept when the `WebView` is at its scroll edge in the swipe direction, while WebView scrolling continues to work when the WebView can still scroll.
- The #33133 behavior is preserved for `WebView` inside ordinary scroll parents that are not `MauiSwipeView`.
Fixes #36154
### Tested the behavior in the following platforms
- [ ] Windows
- [x] Android
- [ ] iOS
- [ ] Mac
| Before Issue Fix | After Issue Fix |
|----------|----------|
| <video src="https://github.com/user-attachments/assets/2b93fd4f-3378-4493-a35c-eb76825f165c"> | <video src="https://github.com/user-attachments/assets/bc8867b3-7da1-421e-9b54-041ec9623dcb"> |
🏁 Report — Final Recommendation
Comparative Fix Report — PR #36231
Candidate Ranking
| Rank | Candidate | Regression result | Expert-review result | Assessment |
|---|---|---|---|---|
| 1 | try-fix-3 |
PASS | Clean ([]) |
Best balance. Keeps Android's initial child-capture handshake on ACTION_DOWN, then dynamically releases interception on MOVE only when the WebView cannot scroll further in the dominant gesture direction. The logic lives in MauiWebView, so it naturally covers wrapped WebViews and avoids new public API surface. |
| 2 | pr-plus-reviewer |
PR gate PASS; sandbox patch not re-gated per instruction | Fixes raw PR's major inline finding | Strong PR-derived candidate. It keeps the PR approach and applies the expert feedback by routing nested AWebView children through direction-aware edge checks. It still changes both MauiWebView and MauiSwipeView, relies on cached SwipeView-parent state, and adds the OnDetachedFromWindow public API entry. |
| 3 | try-fix-1 |
PASS | Clean ([]) |
Functionally viable, including wrapped WebViews, but more invasive than necessary. It overrides MauiSwipeView.RequestDisallowInterceptTouchEvent, adds a public API entry, and performs recursive WebView hit testing on the touch path. |
| 4 | pr |
Gate PASS | Major finding | Fixes the direct tested scenario, but leaves wrapped WebViews routed through generic ViewGroup scroll handling instead of direction-aware WebView edge checks. |
| 5 | try-fix-2 |
FAIL | Major finding | Ranked below all passing candidates as required. Although the UI command passed, expert review identified an Android dispatch-ordering flaw: it does not disallow parent interception on ACTION_DOWN, so SwipeView can steal the first MOVE before WebView decides whether it can scroll. |
Candidate Details
pr
The raw PR suppresses MauiWebView disallow-intercept requests when a SwipeView ancestor is cached, then adds MauiSwipeView.ShouldInterceptWebViewTouch for direct WebView content. This matches the issue's direct reproduction and the supplied gate result, but the expert reviewer found an unresolved wrapped-WebView gap in MauiSwipeView.
pr-plus-reviewer
This candidate applies the expert reviewer's actionable feedback in a sandbox copy. The nested AWebView case in MauiSwipeView.ShouldInterceptScrollChildrenTouch now calls ShouldInterceptWebViewTouch(webView, swipeDirection), so wrapped WebViews use the same direction-aware edge checks as direct WebViews. This is a strict improvement over pr, but it remains more coupled than the best alternative because parent detection is split between MauiWebView and MauiSwipeView.
try-fix-1
This parent-owned approach lets MauiSwipeView ignore WebView disallow-intercept requests and perform WebView edge arbitration itself. It passed the regression and reviewer checks, but it is broader than needed: it overrides a public Android ViewGroup method, adds a public API entry, and adds recursive target detection in SwipeView's touch path.
try-fix-2
This WebView-owned direction-aware approach failed after expert review. It does not call RequestDisallowInterceptTouchEvent(true) on ACTION_DOWN inside SwipeView, which means Android parent interception can occur before WebView receives the first MOVE and before the candidate can apply its edge logic. Per the requirement, this failed candidate is ranked below all passing candidates.
try-fix-3
This is the strongest candidate. It keeps RequestDisallowInterceptTouchEvent(true) on ACTION_DOWN, preserving Android's normal initial child-capture behavior and the #33133 WebView-in-ScrollView protection. On later MOVE events under MauiSwipeView, it computes the dominant gesture direction from the initial touch point and keeps or releases parent interception based on CanScrollHorizontally / CanScrollVertically. Because the logic is owned by MauiWebView, wrapped WebViews are handled without needing SwipeView to discover nested WebViews.
Winner
Winner: try-fix-3
Rationale: try-fix-3 is the only candidate that passed the regression evidence, received clean expert-review findings, avoids the raw PR's wrapped-WebView gap, avoids candidate 1's public RequestDisallowInterceptTouchEvent override, and avoids adding new public API surface. It also directly addresses the Android dispatch-ordering problem found in try-fix-2 by preserving the initial ACTION_DOWN disallow-intercept handshake.
🧭 Next Steps — alternative fix proposed (try-fix-3)
Automated review — alternative fix proposed
The expert-reviewer evaluation compared the PR fix against automatically generated candidates and selected try-fix-3 as the strongest fix.
Why: try-fix-3 passed the Android regression evidence and had clean expert-review findings while avoiding the raw PR wrapped-WebView gap, candidate 1 public override/API surface, and candidate 2 ACTION_DOWN ordering flaw.
Please consider applying the candidate diff below (or use it as guidance). Once you push an update, this workflow will re-trigger and re-evaluate.
Candidate diff (try-fix-3)
diff --git a/src/Core/src/Platform/Android/MauiWebView.cs b/src/Core/src/Platform/Android/MauiWebView.cs
index 2d571d5003..5371444d54 100644
--- a/src/Core/src/Platform/Android/MauiWebView.cs
+++ b/src/Core/src/Platform/Android/MauiWebView.cs
@@ -12,6 +12,9 @@ namespace Microsoft.Maui.Platform
readonly WebViewHandler _handler;
readonly Rect _clipRect;
+ float _initialTouchX;
+ float _initialTouchY;
+ bool _hasInitialTouch;
public MauiWebView(WebViewHandler handler, Context context) : base(context)
{
@@ -73,12 +76,26 @@ namespace Microsoft.Maui.Platform
switch (e.Action)
{
case MotionEventActions.Down:
- case MotionEventActions.Move:
+ _initialTouchX = e.GetX();
+ _initialTouchY = e.GetY();
+ _hasInitialTouch = true;
Parent?.RequestDisallowInterceptTouchEvent(true);
break;
+ case MotionEventActions.Move:
+ if (((View)this).GetParentOfType<MauiSwipeView>() is not null)
+ {
+ Parent?.RequestDisallowInterceptTouchEvent(ShouldKeepTouchEventsInWebView(e));
+ }
+ else
+ {
+ Parent?.RequestDisallowInterceptTouchEvent(true);
+ }
+ break;
+
case MotionEventActions.Up:
case MotionEventActions.Cancel:
+ _hasInitialTouch = false;
Parent?.RequestDisallowInterceptTouchEvent(false);
break;
}
@@ -86,6 +103,23 @@ namespace Microsoft.Maui.Platform
return base.OnTouchEvent(e);
}
+ bool ShouldKeepTouchEventsInWebView(MotionEvent e)
+ {
+ if (!_hasInitialTouch)
+ return false;
+
+ var diffX = e.GetX() - _initialTouchX;
+ var diffY = e.GetY() - _initialTouchY;
+
+ if (diffX == 0 && diffY == 0)
+ return true;
+
+ if (Math.Abs(diffX) > Math.Abs(diffY))
+ return CanScrollHorizontally(diffX > 0 ? -1 : 1);
+
+ return CanScrollVertically(diffY > 0 ? -1 : 1);
+ }
+
void IWebViewDelegate.LoadHtml(string? html, string? baseUrl)
{
_handler?.CurrentNavigationEvent = WebNavigationEvent.NewPage;
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…ix-36154 # Conflicts: # src/Core/src/Platform/Android/MauiWebView.cs
…roid (#36231) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! This PR fixes a regression introduced in #33133 where a `WebView` inside a `SwipeView` on Android stopped responding to swipe gestures entirely. ### Description of Change : **Android platform fixes for WebView inside SwipeView:** - PR #33133 added an unconditional `Parent?.RequestDisallowInterceptTouchEvent(true)` call on every `Down`/`Move` event. When a `WebView` is inside a `SwipeView`, this sets `FLAG_DISALLOW_INTERCEPT` on the `SwipeView`, causing Android to bypass `OnInterceptTouchEvent` for all `Move` events — so the `SwipeView` never detects a swipe. - The fix caches `_hasSwipeViewParent` once in `OnAttachedToWindow` (cleared in `OnDetachedFromWindow`) and guards the `RDIE(true)` call with `if (!_hasSwipeViewParent)`. The #33133 behavior is fully preserved for `WebView`-in-`ScrollView` - Added an early-return path before the loop: if `_contentView` is an `AWebView`, delegate to the new `ShouldInterceptWebViewTouch` which uses `CanScrollHorizontally`/`CanScrollVertically` . The `SwipeView` now only intercepts when the `WebView` is at its scroll edge in the swipe direction. - **Public API update**: The new `OnDetachedFromWindow` override on `MauiWebView` is registered in the public API surface. Fixes #36154 ### Tested the behavior in the following platforms - [ ] Windows - [x] Android - [ ] iOS - [ ] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/2b93fd4f-3378-4493-a35c-eb76825f165c"> | <video src="https://github.com/user-attachments/assets/bc8867b3-7da1-421e-9b54-041ec9623dcb"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…roid (#36231) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! This PR fixes a regression introduced in #33133 where a `WebView` inside a `SwipeView` on Android stopped responding to swipe gestures entirely. ### Description of Change : **Android platform fixes for WebView inside SwipeView:** - PR #33133 added an unconditional `Parent?.RequestDisallowInterceptTouchEvent(true)` call on every `Down`/`Move` event. When a `WebView` is inside a `SwipeView`, this sets `FLAG_DISALLOW_INTERCEPT` on the `SwipeView`, causing Android to bypass `OnInterceptTouchEvent` for all `Move` events — so the `SwipeView` never detects a swipe. - The fix caches `_hasSwipeViewParent` once in `OnAttachedToWindow` (cleared in `OnDetachedFromWindow`) and guards the `RDIE(true)` call with `if (!_hasSwipeViewParent)`. The #33133 behavior is fully preserved for `WebView`-in-`ScrollView` - Added an early-return path before the loop: if `_contentView` is an `AWebView`, delegate to the new `ShouldInterceptWebViewTouch` which uses `CanScrollHorizontally`/`CanScrollVertically` . The `SwipeView` now only intercepts when the `WebView` is at its scroll edge in the swipe direction. - **Public API update**: The new `OnDetachedFromWindow` override on `MauiWebView` is registered in the public API surface. Fixes #36154 ### Tested the behavior in the following platforms - [ ] Windows - [x] Android - [ ] iOS - [ ] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/2b93fd4f-3378-4493-a35c-eb76825f165c"> | <video src="https://github.com/user-attachments/assets/bc8867b3-7da1-421e-9b54-041ec9623dcb"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…roid (#36231) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! This PR fixes a regression introduced in #33133 where a `WebView` inside a `SwipeView` on Android stopped responding to swipe gestures entirely. ### Description of Change : **Android platform fixes for WebView inside SwipeView:** - PR #33133 added an unconditional `Parent?.RequestDisallowInterceptTouchEvent(true)` call on every `Down`/`Move` event. When a `WebView` is inside a `SwipeView`, this sets `FLAG_DISALLOW_INTERCEPT` on the `SwipeView`, causing Android to bypass `OnInterceptTouchEvent` for all `Move` events — so the `SwipeView` never detects a swipe. - The fix caches `_hasSwipeViewParent` once in `OnAttachedToWindow` (cleared in `OnDetachedFromWindow`) and guards the `RDIE(true)` call with `if (!_hasSwipeViewParent)`. The #33133 behavior is fully preserved for `WebView`-in-`ScrollView` - Added an early-return path before the loop: if `_contentView` is an `AWebView`, delegate to the new `ShouldInterceptWebViewTouch` which uses `CanScrollHorizontally`/`CanScrollVertically` . The `SwipeView` now only intercepts when the `WebView` is at its scroll edge in the swipe direction. - **Public API update**: The new `OnDetachedFromWindow` override on `MauiWebView` is registered in the public API surface. Fixes #36154 ### Tested the behavior in the following platforms - [ ] Windows - [x] Android - [ ] iOS - [ ] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/2b93fd4f-3378-4493-a35c-eb76825f165c"> | <video src="https://github.com/user-attachments/assets/bc8867b3-7da1-421e-9b54-041ec9623dcb"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…roid (#36231) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! This PR fixes a regression introduced in #33133 where a `WebView` inside a `SwipeView` on Android stopped responding to swipe gestures entirely. ### Description of Change : **Android platform fixes for WebView inside SwipeView:** - PR #33133 added an unconditional `Parent?.RequestDisallowInterceptTouchEvent(true)` call on every `Down`/`Move` event. When a `WebView` is inside a `SwipeView`, this sets `FLAG_DISALLOW_INTERCEPT` on the `SwipeView`, causing Android to bypass `OnInterceptTouchEvent` for all `Move` events — so the `SwipeView` never detects a swipe. - The fix caches `_hasSwipeViewParent` once in `OnAttachedToWindow` (cleared in `OnDetachedFromWindow`) and guards the `RDIE(true)` call with `if (!_hasSwipeViewParent)`. The #33133 behavior is fully preserved for `WebView`-in-`ScrollView` - Added an early-return path before the loop: if `_contentView` is an `AWebView`, delegate to the new `ShouldInterceptWebViewTouch` which uses `CanScrollHorizontally`/`CanScrollVertically` . The `SwipeView` now only intercepts when the `WebView` is at its scroll edge in the swipe direction. - **Public API update**: The new `OnDetachedFromWindow` override on `MauiWebView` is registered in the public API surface. Fixes #36154 ### Tested the behavior in the following platforms - [ ] Windows - [x] Android - [ ] iOS - [ ] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/2b93fd4f-3378-4493-a35c-eb76825f165c"> | <video src="https://github.com/user-attachments/assets/bc8867b3-7da1-421e-9b54-041ec9623dcb"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
…roid (#36231) <!-- Please keep the note below for people who find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment whether this change resolves your issue. Thank you! This PR fixes a regression introduced in #33133 where a `WebView` inside a `SwipeView` on Android stopped responding to swipe gestures entirely. ### Description of Change : **Android platform fixes for WebView inside SwipeView:** - PR #33133 added an unconditional `Parent?.RequestDisallowInterceptTouchEvent(true)` call on every `Down`/`Move` event. When a `WebView` is inside a `SwipeView`, this sets `FLAG_DISALLOW_INTERCEPT` on the `SwipeView`, causing Android to bypass `OnInterceptTouchEvent` for all `Move` events — so the `SwipeView` never detects a swipe. - The fix caches `_hasSwipeViewParent` once in `OnAttachedToWindow` (cleared in `OnDetachedFromWindow`) and guards the `RDIE(true)` call with `if (!_hasSwipeViewParent)`. The #33133 behavior is fully preserved for `WebView`-in-`ScrollView` - Added an early-return path before the loop: if `_contentView` is an `AWebView`, delegate to the new `ShouldInterceptWebViewTouch` which uses `CanScrollHorizontally`/`CanScrollVertically` . The `SwipeView` now only intercepts when the `WebView` is at its scroll edge in the swipe direction. - **Public API update**: The new `OnDetachedFromWindow` override on `MauiWebView` is registered in the public API surface. Fixes #36154 ### Tested the behavior in the following platforms - [ ] Windows - [x] Android - [ ] iOS - [ ] Mac | Before Issue Fix | After Issue Fix | |----------|----------| | <video src="https://github.com/user-attachments/assets/2b93fd4f-3378-4493-a35c-eb76825f165c"> | <video src="https://github.com/user-attachments/assets/bc8867b3-7da1-421e-9b54-041ec9623dcb"> | <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. --> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Fixes #36154. Forward-ports the final implementation and regression coverage from #36231 to `main`, preserving the newer WebView lifecycle handling already present on `main`. The Android SwipeView now yields to a nested WebView while it can scroll in the gesture direction, and handles the gesture at the WebView edge. --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment whether this change resolves your issue. Thank you!
This PR fixes a regression introduced in #33133 where a
WebViewinside aSwipeViewon Android stopped responding to swipe gestures entirely.Description of Change :
Android platform fixes for WebView inside SwipeView:
PR [Android] Fix WebView scrolling inside ScrollView #33133 added an unconditional
Parent?.RequestDisallowInterceptTouchEvent(true)call on everyDown/Moveevent. When aWebViewis inside aSwipeView, this setsFLAG_DISALLOW_INTERCEPTon theSwipeView, causing Android to bypassOnInterceptTouchEventfor allMoveevents — so theSwipeViewnever detects a swipe.The fix caches
_hasSwipeViewParentonce inOnAttachedToWindow(cleared inOnDetachedFromWindow) and guards theRDIE(true)call withif (!_hasSwipeViewParent). The [Android] Fix WebView scrolling inside ScrollView #33133 behavior is fully preserved forWebView-in-ScrollViewAdded an early-return path before the loop: if
_contentViewis anAWebView, delegate to the newShouldInterceptWebViewTouchwhich usesCanScrollHorizontally/CanScrollVertically. TheSwipeViewnow only intercepts when theWebViewis at its scroll edge in the swipe direction.Public API update: The new
OnDetachedFromWindowoverride onMauiWebViewis registered in the public API surface.Fixes #36154
Tested the behavior in the following platforms
BeforeFix36154.mov
AfterFix36154.mov