HtmlDialog white on Mac

Hi,

Two of my extension users have reported HtmlDialogs just being white on Mac. There is no Ruby or javascript exception, just a blank window.

Has anyone seen this before or know the cause?

One of the affected extensions is Eneroth Scaled Perspective 2.

was it happening in 2020 or earlier…

I’ll have to load to test, but I suspect a jQuery error as it blanks out the dialog…

although both platforms now use CEF, CEF uses WebCore not Blink on a mac…

"5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 SketchUp Pro/19.3 (Mac) Safari/537.36"

It’s safest to ‘use strict’ vanilla js as the various frameworks all see the Safari flag and act on that…

john

The extension seems to work ok in 2020, you could update the product page.

Deleting WebCache in here would be worth trying: ~/Library/Application Support/SketchUp 2020/

Tried with deleted Web Cache folder. Still no work.

Could it be related to the Command states?

Did the users tried to slightly resize the dialog box? Sometime, this happens to force the refresh of the dialog.

1 Like

I get a blank page and lots of errors:

Uncaught ReferenceError: updateFields is not defined
    at chromewebdata/:1

SU v19…

john

Hmm, maybe the code gets executed earlier on Mac, before the DOM has loaded. I’ll have to look into the what triggers what.

this fixes the first issue of the ‘white’ page…

         # @dialog.set_url("#{PLUGIN_ROOT}/dialog.html")
          @dialog.set_file("#{PLUGIN_ROOT}/dialog.html")

but, the second run @dialog.bring_to_front ruins the markup…

I just reuse set_file and show to avoid that…

john

1 Like

Good catch! I had a feel it was something quite obvious once you only knew it it.

bring_to_front is odd. I should file an issue for that.

I think it’s because the are 2 different mac nib files for HtmlDialogs…

one has the Home + Back/Forward Buttons header and the other doesn’t…

on re-run the nib seems to be switched to it, but without the controls…

the Leeds examples sort of hint at the issue, and it was discussed at the time…

but, being a mac issue it…

john

I’ve submitted 5 patched extensions. The dialog should no longer be white.

I don’t really get the bring_to_front issue. This shouldn’t be called unless the dialog is already shown, and should only focus it. If the dialog is hidden it should not be called. I don’t think I have enough information to writ up a report, but at least it doesn’t appear to be an issue in my extension.

Little update: I have now published fixes for Eneroth Scene Visibility, Eneroth Viewport Resizer², Eneroth Scaled perspective² and Eneroth Random Selection. Eneroth Scene Tag Visibility version 1.0.2 is coming shortly.