I have a UI::Command
that when invoked displays a UI::HtmlDialog
with various HTML elements like sliders and buttons. The sliders are used to control the geometry of the model in “real time”, with the catch that a non-Ruby script is invoked every time a slider is updated. However, the extension doesn’t work as smoothly on Windows as it does on the Mac.
The first problem is that on Windows the console is flashing every time the non-Ruby code is called (which I know was documented before, but sadly @eneroth3’s solution did not work for me). The more significant issue, however, is that the UI::HtmlDialog
goes out of focus when any of the sliders are updated via the left/right arrow keys, thus making it impossible to update the model upon subsequent presses of the said keys.
Unfortunately, calling UI::HtmlDialog::bring_to_front
after the non-Ruby script finished did not help at all (and I tested this on both SU2017 and the latest SU2023 on Windows). There is no need to call this on macOS as the arrow keys work as expected and the extension is really fun to interact with.
Is there anything else I should try or does this sound like a Windows-specific bug? Or maybe the console flashing is to blame for this out-of-focus behavior?