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
colin
February 8, 2020, 6:53pm
3
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?
Fredo6
February 10, 2020, 12:08am
5
Did the users tried to slightly resize the dialog box? Sometime, this happens to force the refresh of the dialog.
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
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.