The PreTeXt project uses sage cells extensively, and also downloads
jQuery from
https://sagecell.sagemath.org/static/jquery.min.js
Recently (the problem was noticed a few days ago) some javascript
on the HTML versions of PreTeXt documents has not been working properly.
For example, on the sample article:
https://pretextbook.org/examples/sample-article/html/
when you scroll down the page, the buttons "Index", "Prev", "Up",
and "Next" should stick at the top of the page. That has stopped
working. Also, on a narrow screen the TOC disappears as it should,
but the hamburger button on the bottom left does not bring it back.
Some clues as to the cause: when the page loads, this error appears
in the console (up-to-date Firefox on a MacBook Pro):
TypeError: e.indexOf is not a function embedded_sagecell.js:2834:82466
When I save the page and load it from a local file, I see a similar
message, but from jquery:
TypeError: e.indexOf is not a function jquery.min.js:2:82466
Note that I plan to change the PreTeXt HTML so that it takes jquery.min.js
from a place I can control.
I realize that embedded_sagecell.js loads its own jQuery, but we need
jQuery for other things (like knowls), so I need to explicitly load it.
My questions:
1. Is it possible to revert the version served at
https://sagecell.sagemath.org/static/jquery.min.js
so that the js used by PreTeXt will work again?
2. When we start serving our own jQuery, do I have to do something
to avoid a conflict between the (older) version of jQuery we load
explicitly, and the (presumably newer) version needed for sage cells?
3. The error message about e.indexOf does not seem to impair the
functioning of sage cells. Could that be a jQuery error which makes
a difference to some javascript, but not to sage cells?
I realize that the example I am providing is far from minimal,
so please let me know if I need to make one. But I think I have
identified the problem because if I comment out the jquery.min.js
and the embedded_sagecell.js coming from sagecell.sagemath.org,
and instead insert an earlier version of jquery.min.js, then
those error messages go away and things work as expected.
Regards,
David
--
You received this message because you are subscribed to the Google Groups
"sage-cell" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sage-cell/alpine.LRH.2.21.1812291711330.17427%40li375-150.members.linode.com.
For more options, visit https://groups.google.com/d/optout.