-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Safari bug? #9123
Comments
It seems to me, that safari is the only browser, which saves the view state of a dropdown. When going back in Safari via browser back the state is expanded. In all other browers, the state is reseted to collapse. |
I have seen this too in the wild, I have overridden this in the past with jQuery to fire a page reload if event.persisted exists, but this is not a universal solution as most people would prefer not to reload the page. I had to do this because even targeting the menu to close via classes did not work. Only a hard reload worked. Safari's handling of bfcache could be preferable for most things, but in this case we would rather not save the state of the DOM. A case specific solution for just this plugin would be the way to go, we just need to be careful not to effect other DOM elements that are preferably cashed. The team should discuss a solution |
This also appears to be just the latest versions of Safari. |
Just thought I'd add my input. I can't recreate this in Safari 10, so in at least Safari 10 this isn't an issue; I'm also on macOS Sierra. |
@coreysyms it sounds like you have a sense of what is going on here - I'm not super familiar with bfcache and how it works... is there an event we can listen for here and trigger a reset? Are there any other components where this would make sense? |
We support the following browsers by the browserslist config:
|
I guess we should update the supported Safari versions as 7, 8 and 9 are quite old and not the last 2 versions. |
The browserslist config should be
Which results in
|
That's the same result that I got when I tested in our browserstack instance. All versions before 10 have this issue as far as I know. As this is a browser specific bug and a known one it should be probably handled in projects, not in the framework (or we would end up adding fixes and workarounds for quirks and bugs in old browsers). @ncoden what do you think should we do with this issue? |
I'm not saying that the framework should fix every strange, obscure bug in old browsers, or even this specific bug, but in general I do appreciate when framework work around the most common quirks. In fact, that's one of the reasons I use Foundation; to have a rock solid grid, a normalized look and some well tested, cross-browser working components so I can concentrate on the creative process. |
@ncoden what do you think? Imo we should not add more workarounds for such quirks in older browsers, but this is just my opinion. |
Such decisions should not be made on the basis of gut instinct. Is there no official roadmap? |
Sure, there is one: https://github.com/zurb/foundation-sites/wiki/Project-Roadmap |
Closing for now. We should not use special workarounds for a few outdated browsers. |
This is a mysterious Expand-Collapse-bug with Safari. Because it is a customer site I use a short url. All actions are done with mouse clicks.
Now sub menu expands and collapses automatic infinite without any user action.
The text was updated successfully, but these errors were encountered: