script-lab
script-lab copied to clipboard
Scriptlab with Run Taskpane active keeps document 'dirty'
Bug Report
- Host: WORD (Maybe others as well haven't tested that)
- OS: Windows 10
- Browser: N/A
- Environment: latest
Expected behavior:
When a document is saved while having ScriptLab active with the Run Taskpane side by side the document immediately losing its 'Saved' state. Instead it should stay "Saved" until -real- changes were made to the document.
Actual behavior:
When a document is saved while having ScriptLab active with the Run Taskpane side by side the document immediately losing its 'Saved' state.
By doing so the code in this Gist will always fail as the Saved State turns out to always be 'false'. https://gist.github.com/aafvstam/ed15f2fb836b2cba606f0d92df55be6b
Steps to Reproduce:
Open a document, start ScriptLab with some code, for instance: https://gist.github.com/aafvstam/ed15f2fb836b2cba606f0d92df55be6b
Start the Runner (Run Button Script Lab) This opens the Run Taskpane. Add some text to the document and hit Save (notice the title bar will mention that the document is Saved) Immediately the Document shifts from Saved to 'Dirty' due to the Run Taskpane being active.
I tested this in my Live Coding session, comparing to VBA and new created Add-In to look at the differences and discover that it was related to ScriptLab, for later review: https://youtu.be/FhbIJggahks
Failure Logs:
N/A
Screenshot:
N/A
@aafvstam , is this happening only with the Run pane or the Code pane as well? Also, is this happening only with Script Lab, or other add-ins (e.g., PickIt in PowerPoint, to pull out the first random example that came to mind)
Only happens with the Run pane. As you can see in the Live Coding video (I don't expect you to watch the two hours :-) ) That indicated that the issue would not show up in a normal Add-in. For that reason I created a fresh application to test the Saved state.
My plan was to do a weekly live coding session on Twitch/YouTube to go over all the interface items to somewhat compare it to the good old VSTO/VBA alternatives. So surprisingly I hit this issue with my second item (getting the Saved state and Save the document) taking me two hours to find that the Run dialog was actually resetting the Saved state. My guess is that it has something to do with the 'live connection' between the Code window and the Run window (as it immediately updates whenever the code is changed) but not sure why the Run dialog would interfere with the Saved state.
Hm, interesting. Ok, I'll investigate it (though no guarantees on turnaround time, it might take me a bit and doesn't seems all too awful...)
I understand, for me this all is just an exercise to get in depth knowledge of the OfficeJS Add-ins vs VSTO/VBA and provide proper feedback as the OfficeJS are a bit slow in adoption. I'd like to see better adoption of the OfficeJS tooling so will be focusing on adding more learning materials ;-)