I'm developing firefox extension, and I have a button, which shows <panel> using openPopup method when users moves mouse over button, and close it after few seconds user moves mouse out.
The problem appears if a firefox menu is open开发者_Python百科ed, or context menu, or any toolbarbutton with type="menu" are opened. Then if users moves mouse over my button, my panel is shown, and after that user is able to open one more instance of his menu (context, toolbar, firefox menu). So, there could appear many menus on the screen, and that's confusing.
I want to check, if there are other menus shown on the screen, and if there one, I would'n show my <panel>. How can I do that?
Ok, I think I've found a solution. I get all <menupopup> and <popup> elements by getElementsByTagName and if there one with state="open" (and also without noautohide) then menu is opened. Correct me if I'm wrong.
精彩评论