CSS is not being applied correctly in Safari 13 following a resize

When using Safari, I have noticed that my styles are applied correctly upon page load for any screen size. However, if I resize the window from desktop to mobile and back again, the desktop styles do not get applied. To see this behavior in action, simply open the site in Safari 13 at desktop size, observe the layout, resize the browser to mobile, and then back to desktop. You can also start by loading the site in mobile view and widening the window.

For a test case, visit:

Expected behavior (on load):

https://i.sstatic.net/pHp1a.png

After resizing the browser (Safari 13 only):

https://i.sstatic.net/vyj6B.png

Upon inspecting the menu elements, you will notice that styles-l.css and navigation-desktop.css are applied. However, these style sheets do not apply after resizing the window back to desktop size.

It is important to note that this issue does not seem to be related to JavaScript, as disabling JavaScript does not prevent the behavior.

Key points to remember:

  • This issue is specific to Safari 13. Other versions of Safari and other browsers such as Chrome, Firefox, and Edge do not exhibit this behavior.
  • While I have only experienced this on desktop, it may also impact mobile devices, although I have been unable to replicate it on smaller breakpoints.
  • The initial page load always displays correctly.
  • The problem occurs when the window is resized beyond the mobile breakpoint.
  • Safari seems to stop applying the entire styles-l.css file after resizing the window.
  • This behavior persists even with JavaScript disabled.

This issue seems to be quite rare, as extensive searching has not revealed similar occurrences. However, it is affecting multiple sites that I am currently working on. Interestingly, if you manually edit the parameters of a media query in the inspector, Safari will instantly refresh the page with the correct layout.

Answer №1

I encountered a similar issue where the problem only seemed to occur with the Magento 2 store and Safari 13. Interestingly, I also experienced this issue with other major e-commerce sites such as The Protein Works, Bulk Powders, and sigmabeauty. However, upgrading to macOS Catalina 10.15.7 and Safari 14 resolved the issue for me.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Designing a collection of inline divs that automatically stretch to fit the parent container, while also wrapping to a new line if the minimum width is reached

Welcome to my first post on this platform! I love a good HTML challenge, but I'm stumped on this particular issue and could really use some help. Thank you in advance to anyone who can assist. What I am trying to achieve is to create a series of inl ...

What are the steps to get the Dropdown Button to function in HTML and CSS?

Currently, I am in the process of constructing a website and have set it up so that when the window width is less than 768px, the navbar collapses into a vertical orientation. The issue I am facing is that even though the navbar collapses, the individual i ...

What are the steps to creating a screen that mimics a mirror in the physical world?

Is there a way for the user to see themselves when they open a URL? I'm not looking for a mirror effect like the one produced by jQuery reflection js. I don't want to rely on using the front camera or any other camera to achieve this. Any sugges ...

Conceal the initial modal beneath the overlay when the second modal is activated

I have a situation where I am using a modal that contains a button to trigger a second modal. The issue is that the overlay of the second modal does not hide the first modal, it simply darkens the background. How can I make the overlay of the second modal ...

Modify the background hue of a personalized WordPress HTML block using supplementary CSS styling

My current challenge involves modifying the background color of a specific custom HTML WordPress block. However, when I make changes to one block, it affects the background color of all other custom HTML blocks on different pages. Here is the CSS code I a ...

Tips for synchronizing the height of a scrollable list-group column with a neighboring column

Within my Bootstrap 4 layout, I have a column on the left that includes a dynamically generated .list-group, which could potentially contain numerous .list-group-items. On the right side, there is another column showcasing multiple cards inside a .row. Th ...

Looping in jQuery: Tips for Improving Performance

In my popup window, I have a JavaScript function that utilizes jQuery to retrieve checked checkboxes from the parent window. It then uses jQuery again to access associated data from hidden fields in the parent window for each checkbox. var chked = $(&apos ...

comparing multiple values separated by commas with JavaScript

I need validation using a comma-separated value format. Within the illustration, there are two fields: "Saloon Price" (value: 10,10,10,10) and "Saloon Offer Price" (value: 11,11,11,11). The first value must be less than the second. Saloon price Value & ...

Generate a chart using the REST object by organizing the information in a column format

I am currently working with a REST service that returns a specific object with multiple values and IDs. Here is an example of the object: [ { "id": 100, "value": "2452" }, { "id": 100, "value": "2458" }, { "id": 1, "value ...

Utilizing CSS files to incorporate loading icons in a component by dynamically updating based on passed props

Is it possible to store icons in CSS files and dynamically load them based on props passed into a component? In the provided example found at this CodeSandbox Link, SVG icons are loaded from the library named '@progress/kendo-svg-icons'. Instea ...

The argument 'TabsCtrl1' is throwing an error as it is not recognized as a valid function and is showing as

I have encountered a problem with my controller, and I am seeing the following error message: Error: [ng:areq] Argument 'TabsCtrl1' is not a function, got undefined http://errors.angularjs.org/1.3.0-beta.11/ng/areq?p0=TabsCtrl1&p1=not%20a%20 ...

The jQuery .each function is malfunctioning specifically on Google Chrome browsers

I developed a web application that utilizes jQuery to automatically submit all forms on the page. The code snippet is as follows: $('form').each(function() { $(this).submit(); }); While this functionality works perfectly in Internet Explore ...

What is the best way to transfer a user-generated PNG file to my backend server?

I'm in the process of developing a website that enables users to generate personalized graphics and easily download them directly from the platform. My approach involves allowing users to customize an svg using a javascript-powered form, which is the ...

Utilizing HTML5 canvas to extract pixel data from an image loaded from an external source

When it comes to security reasons, doing it directly may not be feasible. Nevertheless, there are rumors circulating about certain image-hosting platforms that permit the use of their images in a comparable way (could Google Picasa be one?). I might be mis ...

Attempting to utilize a custom element, the message "You attempted to use polymer without loading it first" confirms that it has indeed been imported

I've been experimenting with a custom element for a paper-dialog popup that I want to incorporate. Surprisingly, when I create a test page within the same file where the custom element is defined, using all the identical imports as my main index, it w ...

Updating Django database records with ajax

I'm currently working on a feature that involves filtering table data and updating the table using ajax. Here's what I have so far: Filter Form: <form id="search" method="POST" action="{% url 'article-filter' %}"> <input ...

The hover effect does not work when clicking the mouse button in the Chrome browser

All: [UPDATE] Another method I discovered to achieve this is not a solution, but rather a workaround: Utilize the mousedown event as a trigger (since a drag action is needed, a mousedown event is required), within that, attach a mouseover event to that sp ...

Tips for Maintaining the Execution of a JavaScript Function Within a Class until the Browser Window is Closed (Web Development)

The title might be a little confusing, so let me clarify here: I have implemented a popup that appears in the bottom right corner of a specific page on my website. The popup is working as intended (it shows up when the page is initially opened and can be ...

Ways to assign a default background shade to a webpage with a transparent background

My page has a completely transparent background achieved by using: body { background:none transparent!important; } When I display this page in a transparent iframe on another site, I can see the website's background through the page. However, if ...

Can an advertisement's appearance be altered to include custom content using only CSS?

Dealing with SAP for our ticket system has been quite a challenge due to the design that is causing some frustration. In an attempt to make it more tolerable, I used CSS to make some adjustments. However, my problem now lies in the fact that they keep maki ...