mathlive
mathlive copied to clipboard
[Bug] onUndoStateDidChange and onKeystroke not working in version 0.79
Description
I use MathLive via CDN in my project and it suddenly broke. After investigating I found that the hooks I setup for keystrokes and syncing the undo state for my project no longer worked. I tried console logging immediately in the defintions for onUndoStateDidChange and onKeystroke but nothing happens.
I went to the docs at the cortex website and there is no mention of a change. However, after following the CDN link the website provides, I noticed that the version number is now 0.79 as opposed to 0.77 like the documentation page says. Coming to the github page for the project, the latest release on the sidebar says v0.63... It wasn't until I finally arrived at the npm page that I saw 2 days ago v0.79 was released. However, no documentation.
I finally fixed the error by explicitly stating the last version number that worked for me in the CDN url... https://unpkg.com/[email protected]/dist/mathlive.min.js ... which turned out to be 0.78.2 which again is not documented in the cortex website either.
While my main reason for writing this bug report is to report breaking changes found for onUndoStateDidChange and onKeystroke hooks, another thing that needs to be addressed is proper documentation and version number consistency across distribution channels like github, npm, cortex website, and cdn.
Same. The onKeystroke and onUndoStateDidChange are broken for me on 0.79. I'm not sure what this is about, API change? Because the documentation is still the same.
These deprecated listeners have been removed. This is spelled out in the CHANGELOG, along with how to transition: https://github.com/arnog/mathlive/blob/master/CHANGELOG.md
In general, before filing an issue, consulting the changelog might provide some relevant information.
The mathlive library is not published to GitHub. This used to work, but broke a while ago, and doesn't seem to be used much. That said, if someone wants to volunteer to investigate and provide a fix, I'd be happy to consider it.
The "official" distribution is on npm. The CDN automatically picks up the version from npm. The Cortex website uses the CDN.
The documentation on the Cortex website has not been updated, but the source of the website can be found here: https://github.com/cortex-js/cortexjs.io and if someone want to volunteer to help maintain it, please let me know.
No activity in over two weeks. Closing.