-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Html from Local File in Windows #5523
Comments
@ThomasDallmeier can you show the code of how you were trying to use a local file? |
Hi @ThomasDallmeier. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Hello here is the code:
I add a screenshot for the project |
And here is a part of the project file:
|
verified repro with vs 17.2.0 Preview 3.0 [32323.346.main], but it works fine in Android 11 emulator |
Hello, the example works with a very simple html file. But not with a complex webhelp project. Please see the two screenshot, with the complete different result. I think it is not just a problem with thw missing hightrequest. Here is the complete webhelpview on android: This ist the incomplete result on windows: |
Hello, added screenshots, because I think it is not fixed:
Hello, the example works with a very simple html file. But not with a complex webhelp project. Please see the two screenshot, with the complete different result. I think it is not just a problem with thw missing hightrequest.
Here is the complete webhelpview on android:
This ist the incomplete result on windows:
Von: Rui Marinho ***@***.***>
Antworten an: dotnet/maui ***@***.***>
Datum: Donnerstag, 24. März 2022 um 16:36
An: dotnet/maui ***@***.***>
Cc: ***@***.***" ***@***.***>, Mention ***@***.***>
Betreff: Re: [dotnet/maui] Html from Local File in Windows (Issue #5523)
Closed #5523 via #5539.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I've just tried this with a simple HTML page that sets the background colour to red using Maui GA release with 17.3.0 Preview 1.1 and I get same issue on Windows. Even the sample straight from the Maui WebView docs of loading a simple HTML page by clicking a hyperlink does not work. The inline HTML loads fine, the external file returns a failure in OnNavigated and just loads about:blank page. All files I've tried this with were set as MauiAssets in the properties, and they all copied to the target directory OK. This is a pretty major issue as prevents loading up of client side apps, which with WebView2 on WinUI was going to be huge for us. Any timeline for a fix? Will check iOS when I get a chance. |
I've submitted a PR for this which resolves the issue for me on WinUI3. I tested with a simple web page first, and a more complex client side app after. I commented on there that there are 2 parts to this issue highlighted by my testing, 1) the implementation in MauiWebView on Windows, and; 2) an issue in the WebView2 control when loading more complex client-side applications. The latter is resolved if you install Edge from the Beta channel, so I can only assume the underlying issue is fixed and will be included in the next WebView2 release. Assume this shouldn't prevent merging of the PR though as code still valid. It's my first PR to Maui, so hope it's OK! |
* Fix for #5523 MauiWebView not loading local files on Windows * Unpackaged app support for local HTML files. * Use property for path * Auto map/unmap virtual host for app dir when navigating to safe/unsafe URIs Co-authored-by: Conor Breen <[email protected]>
fixed by #7672 7672 |
Description
Hello, local files are not displayed under windows. If you work like described in the documentation, local files are displayed in Android, but not in windows.
Steps to Reproduce
Try it like described in the documentation
Version with bug
Preview 14 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
Latest Win 11
Did you find any workaround?
no
Relevant log output
No response
The text was updated successfully, but these errors were encountered: