[Problem/Bug]: Disabling built-in error pages not working as expected
gokselgoktas opened this issue · comments
Göksel Göktas commented
What happened?
Setting IsBuiltInErrorPageEnabled
to FALSE
via ICoreWebView2Settings::put_IsBuiltinErrorPageEnabled
does not disable the built-in error pages as expected.
Expected Behavior
- The built-in error pages should be disabled after setting
IsBuiltInErrorPageEnabled
toFALSE
. - Unless the library-user navigates to a custom error page, nothing should be displayed instead of the built-in error pages when navigation errors occur.
Actual Behavior
- Even with
IsBuiltInErrorPageEnabled
set toFALSE
, the built-in error pages still appear. - Emitting HTML error responses from
ICoreWebView2WebResourceRequestedEventHandler
results in the built-in error page flashing before displaying the custom error page.
Additional Information
The issue persists even when omitting the NavigateToString
call in ICoreWebView2NavigationCompletedEventHandler
.
Importance
Moderate. My app's user experience is affected, but still usable.
Runtime Channel
Stable release (WebView2 Runtime)
Runtime Version
124.0.2478.80
SDK Version
1.0.2088.41
Framework
Win32
Operating System
Windows 11
OS Version
23H2
Repro steps
- Set
IsBuiltInErrorPageEnabled
toFALSE
within theICoreWebView2CreateCoreWebView2ControllerCompletedHandler
callback. - Register a custom URI scheme and handle associated requests using
AddWebResourceRequestedFilter
andICoreWebView2WebResourceRequestedEventHandler
. - Register a
ICoreWebView2NavigationCompletedEventHandler
to handle navigation errors and display a custom error page usingNavigateToString
.
Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Don't know
Last working version (if regression)
No response