Closing a WebContextualMenu

I’m starting to experiment with placing a WebContextualMenu on a WebListBox (as an EventHandler) and I have no problem getting that to show the menu on a RightClick on a WebListBox row, and getting the user-selected Menu Item to execute. I also make sure I have a Menu item called “Cancel” that is not hooked to a Menu Action so the user can close the menu when not desiring to choose anything. But I find that if the user fails to click on anything at all in that menu, and clicks somewhere else in the WebPage, the menu remains visible and the menu action is still executable for the WebListBox row previously selected.

is there a way to close the WebContextualMenu when the user clicks outside it? I don’t even see a method that closes a WebContextualMenu for me to play with.

I am not having any issue with the contextual menu staying open when I click elsewhere on the page.
However, in my testing the ContextualMenuAction event for the listbox is never triggering in both Safari and Brave (Chrome).

Weird results, nothing helpful :confused:

I just tried with both Chrome and Safai (on a Mac) in DebugMode and the WebContextualMenu stays active when clicking outside it. My original post was posted after only doing this with Chrome.

Unless someone posts a way around this, I’ll just stay away from using WebContextualMenus altogether.

Due to the inconsistencies in behavior with this thread alone that’s my plan going forward.
I don’t plan to find out from users what other inconsistencies or bugs there are with it.

I should remark that I’m building Web apps with Xojo 2017r3, in case it’s relevant.

My test was performed in 2018r1.1