Both WebDialog and HtmlDialog are supposed to automatically save the size and position, … and then restore it next time it is opened. This is what the :preferences_key argument is for in the constructor call.
There is an open issue in the official tracker. Is your issue related ?
No, I think that’s a separate issue, where the dialog is open at the time that the user exits Sketchup, and the on_close callback is not called. In my case, the callback does run, but after the HtmlDialog is closed.
Is it okay to go ahead and log the issue on the Github page, or is it preferred to raise them here first?
It is always OK either way. What many coders do is insert a link back to a forum topic in the GitHub report, if they discussed it here first. Also always good to post a link to the GitHub issue report in such forum threads.
However, the documentation for the UI::HtmlDialog class indicates that developers should be using the #set_can_close callback to run a block of code before the dialog window closes. This callback must return a boolean value to tell the SketchUp internals whether to proceed with closing the CEF window.
The documentation is quite clear that the #set_on_closed callback is … “used to attach a block that will be executed when a dialog is already in the process of closing” …
So, despite that it worked differently in older versions, it still does not violate the API contract per the documentation. Some other fix likely has made the CEF windows close quicker than it did previously.