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

Preserve drawing buffer for gl3d scenes when using Safari 13 #5351

Merged
merged 8 commits into from Dec 18, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Dec 17, 2020

Fixes #5158.

@plotly/plotly_js

@archmoj
Copy link
Contributor Author

archmoj commented Dec 17, 2020

if(isNumeric(v)) v = +v;

// to fix https://github.com/plotly/plotly.js/issues/5158
if(v >= 14) return true;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand navigator.userAgent... Here's what I see on my laptop browsers:

Chrome:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36

Safari:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15

FireFox:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:84.0) Gecko/20100101 Firefox/84.0

Edge:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.68

Brave:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_16_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36"

So by the test here, everything except FireFox would look like Safari >= 14 - Safari 80, Safari 87... That's probably not what we want.
(Amusingly they all have different ideas what OS version I'm running, and only Chrome is correct. Safari, Apple's own, is the farthest off)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Fixed in the commits below.

@archmoj archmoj changed the title Preserve drawing buffer for gl3d scenes when using Safari 14 Preserve drawing buffer for gl3d scenes when using Safari 13 Dec 18, 2020
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's quite a list of userAgent strings 😳
Looks great. 💃

@archmoj archmoj merged commit 8e1ad5e into master Dec 18, 2020
@archmoj archmoj deleted the preserve-drawing-buffer-safari14 branch December 18, 2020 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3D plots not showing on Safari Version 14.0 when there is transparency in the scene
2 participants