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

onXmlChange/onJsonChange do not always fire with onWorkspaceChange #107

Open
auswan3 opened this issue Jan 15, 2024 · 1 comment
Open

onXmlChange/onJsonChange do not always fire with onWorkspaceChange #107

auswan3 opened this issue Jan 15, 2024 · 1 comment

Comments

@auswan3
Copy link

auswan3 commented Jan 15, 2024

I use onWorkspaceChange to trigger conversion of blocks to python code. This fires consistently.
I used onJsonChange to trigger conversion of blocks to string (JSON.stringify) to update state. This doesn't fire consistently.
For example, edit an existing workspace with two random string blocks:
1 - edit first string and hit enter. Both onWorkspaceChange and onJsonChange fire as expected
2 - edit second string and hit enter. Only onWorkspaceChange fires.
3 - click elsewhere to deselect second string. Only onJsonChange fires (late).

To get around this inconsistency, I've switched to rely entirely on the onWorkspaceChange event.

@nbudin
Copy link
Owner

nbudin commented Jan 16, 2024

Interesting, thanks for the bug report! If you have some code that shows the misbehavior from onJsonChange, could you share it so I can reproduce the issue?

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