Modal HtmlDialog on Mac?

That’s what @john_drivenupthewall saw, but not what I saw! On my Mac the dialog from your original version appears on screen and looks like this:

Clicking either of the buttons or the red close circle closes the window and returns control to SU. The dialog’s default title is somewhat funky, so one would want to provide something more sensible, but it works.

The second version opens a large window with the title you provided and the contents just the word HTML. It works the same as before, but of course there are no buttons so I must click the red circle to close it, at which point control returns to SU.

Perhaps the behavior is sensitive to the version of OS X, as John’s profile says 10.11.5 whereas I am running 10.13.3. If there is a version sensitivity that causes this, yes it is a serious bug!