-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
When using HtmlWebViewSource in .NET MAUI, the GoBack() and GoForward() methods do not work as expected, particularly on iOS. If I initially set a local HTML content (via HtmlWebViewSource) and later navigate to an external URL, invoking GoBack() does not reload the previous HTML content. Instead, nothing happens, and the HTML page is never shown again on iOS.
This issue does not occur when navigating between actual URLs using UrlWebViewSource. In that case, GoBack() and GoForward() function correctly.
| iOS Output | Android Output |
|---|---|
Screen.Recording.2025-07-02.at.6.38.41.PM.mov |
Screen.Recording.2025-07-02.at.6.38.03.PM.mov |
Steps to Reproduce
- Run the application WebViewSample 2.zip
- Tap the link inside the WebView. It will navigate from the HTML content to https://github.com/dotnet/maui.
- Tap the “Go Back” button. The WebView should return to the original HtmlWebViewSource content.
Expected Behavior:
After navigating from a local HTML page (HtmlWebViewSource) to a URL, calling GoBack() should return the user to the original HTML content.
Actual Behavior:
The navigation history doesn't retain HtmlWebViewSource pages. GoBack() doesn't navigate back to the HTML content.
Link to public reproduction project repository
No response
Version with bug
9.0.81 SR8.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
No response
Affected platforms
macOS, iOS
Affected platform versions
No response
Did you find any workaround?
No response