Skip to content
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

Library is breaking safari-features (e.g. web-push) #22

Open
HailToDodongo opened this issue Sep 8, 2020 · 3 comments
Open

Library is breaking safari-features (e.g. web-push) #22

HailToDodongo opened this issue Sep 8, 2020 · 3 comments

Comments

@HailToDodongo
Copy link

In this line the variable safari is set, which will also override window.safari :

var safari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent),

However, this is already set by safari itself and contains important objects like window.safari.pushNotification.
This prevents/breaks web-push functionality on safari.
These checks should be scoped locally anyways to prevent polluting the global namespace.

@bluewolf2072
Copy link

bluewolf2072 commented Oct 6, 2020

I opened the test/demo files on my Mac, and on Mac every browser I have fully worked, except Safari won't show any images, it did show the shaded containers with the info and that was it....
The Safari code line in all .JS files needs to be updated.

@bluewolf2072
Copy link

UPDATE!
For me this issue has been resolved... I decided to do further testing, so I uploaded the demo and dist files to a test folder on one of my websites. Guess what loaded in Safari? - yeah the demo index file. I even tested the link on an iOS device and it loaded. The Parallax effect was fully functional. With my test I even created a video at the top and that was fully working for the most part, though I have to redo the code for the video to make sure it takes full screen even for mobile and to remove padding below it.

With Safari on Mac OS, if you do not have the Developer option turned on you will not see the demo live or function.. With my test the server version was fully functional before turning the Developer mode on, once it was activated then the local demo files were also working. On my Mac I opened the local files with VS Code and then used LiveServer to view the content in Safari to see if the issue was still there and it was not; this prompted me to do an actually test from a live website and it worked..

@HailToDodongo
Copy link
Author

This issue is not about the functionality of the library, it's working fine as it is.
It's about the fact that it's breaking other functions that the browser provides (like webpush).
Which can be prevented by not polluting the safari property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants