Is there any way to check if the context menu is active (open)?
The following code shows the status of the context menus
if (viewer.contextMenu.contextMenu.menus.length > 0) return true; // is active else return false; // is not active