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

Support browsers that don't support SVG #126

Closed
jcubic opened this issue Sep 11, 2016 · 4 comments
Closed

Support browsers that don't support SVG #126

jcubic opened this issue Sep 11, 2016 · 4 comments

Comments

@jcubic
Copy link

jcubic commented Sep 11, 2016

I have old Android phone with default browser that don't support svg and icons are not visible. It would be nice if baguetteBox check if svg is supported before using it.

@feimosi
Copy link
Owner

feimosi commented Sep 11, 2016

Hi, I've already got a fallback for SVG support:
https://github.com/feimosi/baguetteBox.js/blob/dev/src/baguetteBox.js#L162

The reason you don't see any buttons is because they are hidden on mobile devices by default. You may want to use { buttons: true } option to enabled them.

@jcubic
Copy link
Author

jcubic commented Sep 11, 2016

It work for prev/next but close is not visible. Visible is only background.

@feimosi
Copy link
Owner

feimosi commented Sep 12, 2016

Ok, interesting, but I've got a clue, it may be caused by not closing the entity value here:
https://github.com/feimosi/baguetteBox.js/blob/dev/src/baguetteBox.js#L281
Can you change that line to:
closeButton.innerHTML = supports.svg ? closeX : '×';
and test it on your device?

@jcubic
Copy link
Author

jcubic commented Sep 12, 2016

Yes it work.

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