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
Safari not showing three.js plots #31983
Comments
Attachment: bad_sage.html.gz |
comment:1
Attachment: three.min.js.gz |
comment:2
Is this an upstreamable issue? |
comment:3
Replying to @dimpase:
Upstream here would be Apple. One could try https://tidbits.com/2020/06/17/how-to-report-bugs-to-apple-so-they-get-fixed/ but quite possibly this is an intensional safety feature, and anyway my impression is that Apple rarely response to bug reports, even from registered Apple developers such as culler. |
comment:4
Replying to @NathanDunfield:
I certainly meant three.js One could try https://tidbits.com/2020/06/17/how-to-report-bugs-to-apple-so-they-get-fixed/ but quite possibly this is an intensional safety feature, and anyway my impression is that Apple rarely response to bug reports, even from registered Apple developers such as culler. |
comment:5
Replying to @dimpase:
There is nothing they can do as far as I can see. The problem is that the file The obvious if inelegant fix on the Sage side would be to dump all of
line. |
comment:6
If three.js people cannot do anything with it, then this means that by default Safari is not be working with a gazillion other js tools, something I find hard to believe. |
comment:7
I was able to duplicate the issue without As for being hard to believe, note that it only manifests itself when loading local files, something most users never do, and only when they are arranged in a particular way. Moreover, further testing indicates the rule is not:
but
This means if a program opens their local HTML docs at the top level, probably the most common reason local files are opened, there will be no issue, even if individual files refer to stuff in directories above them. |
Minimal nonworking example, three.js free, shows issue with HTML not just JS. |
comment:8
Attachment: safari_issue.tar.gz |
comment:11
Confirming original issue. I'm surprised this hasn't come up with the (new) MacOS app, but perhaps those users all (like me) ordinarily have the developer menu on, or only use notebooks? |
comment:12
Replying to @kcrisman:
Having the developer menu on is surely very uncommon, so it's likely that most use notebooks or have a different default browser (no issue with Chrome or Firefox). Just to update the ticket, this continues to be a problem with Safari 15.5 on Big Sur (11.6.7). |
comment:13
Thanks.
Sorry, I had meant to imply exactly that with my comment:11, but forgot that people can't read my mind. |
With Sage 9.3 on macOS Catalina and default browser set to Safari 14.1.1, if I open a Terminal.app window, start sage, and type:
an essentially blank webpage opens in Safari (there is the little "i in a circle" menu in the lower-right corner but no plot).
On the same system, the plot appears fine if I switch to Chrome or Firefox. Moreover, if in Safari I turn on the developer menu, it works ok there as well. Note this is specific to the plots created at the command line; Jupyter notebooks are unaffected.
Based on my testing, I believe that, with the developer menu off, Safari will not pull in script files when they are not located at or below the location of the html file. Specifically, I copied one of the tmp_hash.html files to the attached
bad_sage.html
and played with different locations and values of thescript src
forthree.min.js
. For example, in is current form, if I put a copy ofthree.min.js
in$HOME
then Safari opensbad_sage.html
when it in$HOME
but not if the html file is in$HOME/Desktop
or/tmp
.CC: @dimpase @culler @paulmasson
Component: graphics
Keywords: macOS, Safari, three.js
Issue created by migration from https://trac.sagemath.org/ticket/31983
The text was updated successfully, but these errors were encountered: