MoI discussion forum
MoI discussion forum

Full Version: Close toolbar on submenu closing

Show messages: All  1-2  3-6

From: vector illustrator (QUARITEXA)
17 Jan 2020   [#3] In reply to [#2]
Excellent. The first method suited me better.

Once more question. How can I close the toolbar when I click on an empty space in the viewport?
From: Michael Gibson
17 Jan 2020   [#4] In reply to [#3]
Hi Quaritexa, flyout menus should be closing automatically if you click outside of them.

Is your main toolbar a flyout menu or a dialog window?

- Michael
From: vector illustrator (QUARITEXA)
17 Jan 2020   [#5] In reply to [#4]
The toolbar creates using the moi.ui.createDialog
From: Michael Gibson
17 Jan 2020   [#6] In reply to [#5]
Hi Quaritexa, there isn't any way set up for a dialog to be dismissed when clicking outside of it. That's how flyout menus work.

You might experiment with setting up an interval timer and checking if document.hasFocus is false, and set a global variable flag when you are in a modal loop so you can ignore those.

- Michael

Show messages: All  1-2  3-6