PDA

View Full Version : Menu items that are opened on top of frames - can not be closed



maya
20 Apr 2007, 2:30 PM
Hi,

I have a menu item that has 5 options (a pop-down menu item). After opening the option list, I can close the list if I click anywhere on the screen. Nevertheless, if the list is opened on a frame or iframe area - when I click on the frame/iframe - the option list is not closed.

Is there any workaround?

Thanks,
Maya

jack.slocum
20 Apr 2007, 3:47 PM
This is not a bug. There is no way for the menu to know about mouse downs that occur in different documents/frames. The only thing you can do is listen in your child frame for mousedown and call to MenuMgr.hideAll in the top frame.

maya
26 Apr 2007, 11:53 AM
Thanks Jack, will try and implement what you desacribed, and report (this time in the right forum area...) if there are any "side effects".

maya
14 May 2007, 12:18 PM
Hi,

I tried to add to the iframe's src the following code, but it doesn't close the open menu options:

document.onmousedown = document_onmousedown;
function document_onmousedown()
{
parent.Ext.menu.MenuMgr.hideAll();
}

In addition, in this constellation, how can I make sure that Ext is ready in the parent page? Maybe the user presses on the iframe area before Ext was created in the parent page.

Thanks,
Maya

maya
14 May 2007, 12:26 PM
OK, I just discovered what is not working:

If I add the code I sent to the iframe, and I open a MENU+multiple items in the parent doc, the code works OK (when clicking on the iframe the items are closed).

BUT:

It doesn't work for an Ext.form.ComboBox! (when clicking on the iframe the items are NOT closed)

Please advise.

Thanks,
Maya.

michal
25 Nov 2008, 6:29 AM
Hello,

Continue with the same problem...
The menu is opened on an iframe.
I used invisible mask on the iframe element - in this way I can close the menu onclick.

The problem is that when I click on the west region (a different region from the menu) the menu will not close.

I want to mask the top window but not the menu
Is it possible?
Any suggestions?

Thanks,
Michal

uhyonc
4 Jan 2009, 6:18 PM
On IE, you can use IFrame's onactivate event handler to hide the menu.
On Firefox, onactivate doesn't exist, so you may be out of luck. You might want try onfocus... I haven't tested it myself, 'cause our system only needs to support IE.