Detecting if the Context menu is open

is there any way to detect the context menu closing, or if it is closed?
something similar to onSelect but for closing.
thanks