twentytwenty icon indicating copy to clipboard operation
twentytwenty copied to clipboard

safari (7 and 8) support

Open nosilver4u opened this issue 7 years ago • 2 comments

It would be nice for the readme to specify that only Safari 9+ is supported. From what I can see, 7 and 8 both lack support for "Symbol", which causes a fatal error.

screenshot from 2017-07-05 11-51-49

Now I'm off to go find a way to unbreak my site for folks using old versions of Mac OS X

nosilver4u avatar Jul 05 '17 19:07 nosilver4u

I should also mention that somehow this error never triggers when the script is unminified. I'm using Autoptimize in WordPress, and only when it's been merged and minified does the error occur. Fix was pretty simple, just wrapped the problematic line in an if,else similar to what core jQuery does:

if ( typeof Symbol === "function" ) { var eventsSymbol = Symbol('events'); } else { var eventsSymbol = {}; }

nosilver4u avatar Jul 05 '17 19:07 nosilver4u

@nosilver4u - This COULD be related to this issue https://github.com/zurb/twentytwenty/issues/78 - Symbol is an ES6 method which has only recently been supported natively in modern browsers. If you take a look at this issue I've linked, a few of us have found suitable polyfills that can be used to resolve this issue. The error itself seems to come from the jquery.event.move dependency. I would suggest giving this a go and seeing how you get on! I've made a suggestion to get this documented in the linked issue but so far no response from the folks at Zurb.

JamieBradders avatar Aug 12 '17 14:08 JamieBradders