Closed fingers10 closed 2 years ago
@fingers10 Thank you for reporting!
However, unfortunately, I was not able to reproduce the problem that you reported even though I spent a lot of hours. 😥
This problem looks not so obvious.
Could you tell me more details about your project, such as the target framework version (Core3.1, 5.0, 6.0, etc.), runtime type (Blazor server or Blazor WebAssembly), and your app is PWA or not, etc.
Of course, attaching the zipped project file that is minimal to reproduce the problem into this thread is much helpful to figure out the reason for the problem.
@jsakamoto , here is the repro repo link. Please let me know if any additional details are needed.
@fingers10 Thank you for providing the URL of your repository to reproduce the problem.
However, unexpectedly, that project worked well in my local environment.
So I have a question.
In your environment, in the "Service Workers" section of the "Application" tab, of the browser's developer tools window, is there any service worker registered?
If it is yes, then could you try out the following steps?
1. Please unregister the service worker.
2. Clear all of the caches of the Blazor application.
3. Close all web browser tabs and windows.
4. Re-launch the web browser, and after opening the app, set the "Disable cache" check box in the "Network" tab and hard reload it.
I hope the app will work fine once after doing that.
@jsakamoto did you publish the project and running it from iis? It will work properly in development mode but not after publish
@jsakamoto
I did the dotnet publish -c:Release
command, and serve the published contents files by using dotnet serve
global tool like this:
dotnet serve -d:"bin/Release/net6.0/publish/wwwroot" -S
I did not make it run on IIS.
@jsakamoto ,
Many thanks for your time and response, Here are the response to previous questions.
I have no service workers registered.
Disabled cache and did a hard reload
Published and running in IIS/ GitHub Pages. Issue occurs in both
As you can see from above image,
<meta name="viewport" media="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" content="">
but index.html
has
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
This breaks the responsiveness of page.
@fingers10 Thanks for the excellent reporting!
Due to your contribution, I found a critical bug in this library!
Could you try out the latest version?
@jsakamoto I tried 7.1.1 and that works as expected. many thanks for your time and efforts to look on to this.
This is optional - I would be more happy if you could write a recommendation to me on linkedin if you find my contributions are worthy.
After upgrading to 7.1.0,
content
attribute of normal<meta>
element inindex.html
gets replaced bymedia
attribute and thecontent
attribute value becomes empty inblazor wasm
apps and this produces unexpected results in browser.Example,
This,
Becomes,
This breaks the responsiveness of the site.
All the
<meta>
tags inindex.html
gets affected.<meta>
tags inindex.html
withcontent
attribute<meta>
tags inindex.html
withcontent
attribute replaced bymedia
attribute andcontent
attribute value becomes empty