-
Notifications
You must be signed in to change notification settings - Fork 11
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
[Bug] 7.1.0 - <meta> content attribute value becomes empty and gets replaced by media attribute which gives unexpected results in browser #30
Comments
@fingers10 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 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 |
I did the
I did not make it run on IIS. |
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 <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 emptyThe text was updated successfully, but these errors were encountered: