My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 729: Menu does not go away with frame combination
7 people starred this issue and may be notified of changes. Back to list
Status:  Accepted
Owner:  jlabanca+personal@google.com
Type-Defect
Category-UI
Milestone-Planned


Sign in to add a comment
 
Reported by dipakpaul, Feb 26, 2007
Found in GWT Release: gwt-windows-1.2.22.zip

Detailed description:
I have a page layout in which there is a menubar at the top of the page and
two panels with two frames at the bottom.  On load frames are loading with
pdf documents.  When I open a menu and then decide not to select something
and instead just click on a spot outside of the menu, the menu does not go
away.  Most users would expect the menu to go away when they click outside
of the menu, but I can do any operation with these frames and the menu does
not go away.

Is this open issue in GWT, if not treat as bug?


Workaround if you have one:
Links to the relevant GWT Developer Forum posts:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/5d51a3ab3f2b2350/16216a70181e0da8?lnk=gst&q=menu%2Biframe&rnum=1#16216a70181e0da8

Comment 1 by dipakpaul, Feb 28, 2007
For time being I am able to sort it out in another way. Added mouse over event in the
frame and onmouseover I am deleting menu and adding again. After compilation of GWT
source code it will generates javascript file and this addition and deletion will
happen using DHTML (I think). User can't see this addition and deletion

Frame frame = new Frame(getUrl()) {
  public void onBrowserEvent(Event event) {
    super.onBrowserEvent(event);
    RootPanel.get("MainMenu").remove(menuGrid);
    RootPanel.get("MainMenu").add(menuGrid);
  }
};
frame.sinkEvents(Event.ONMOUSEOVER);
Comment 2 by gwt.team.morrildl, Mar 01, 2007
dipakpaul -- two requests:

1. Please provide a code sample demonstrating the problem if possible.

2. When you say "click outside of the menu" which frame are you referring to?  i.e.
are you clicking in the PDF frame, or are you clicking in the frame containing your
menu?  Does the menu not close at all, or does it not close only when you click on
the PDF frame?
Status: NeedsInfo
Owner: gwt.team.morrildl
Comment 3 by dipakpaul, Mar 04, 2007
Page layout is
---------------------------
GWT Menus
---------------------------
GWT frame (with PDF document)
---------------------------

Problem code was:
Frame frame = new Frame(getUrl());
frame.setWidth("100%");
frame.setHeight("100%");
RootPanel.get("MainMenu").add(menuGrid);
RootPanel.get("Frame").add(frame);


Fixed Code is:
Frame frame = new Frame(getUrl()) {
  public void onBrowserEvent(Event event) {
    super.onBrowserEvent(event);
    RootPanel.get("MainMenu").remove(menuGrid);
    RootPanel.get("MainMenu").add(menuGrid);
  }
};
frame.sinkEvents(Event.ONMOUSEOVER);
frame.setWidth("100%");
frame.setHeight("100%");
RootPanel.get("MainMenu").add(menuGrid);
RootPanel.get("Frame").add(frame);

If any other thing require please shoot comments
Comment 4 by dipakpaul, Mar 04, 2007
Clicked on any menu it is opening submenu drop down. After that I went to iframe and
doing some operations, but submenu items still showing, this is the problem. Menu
does not close only when we clicked on iframe.
Comment 5 by gwt.team.morrildl, Mar 08, 2007
(No comment was entered for this change.)
Status: New
Owner: ---
Cc: gwt.team.jgw
Labels: Category-UI
Comment 6 by gwt.team.jgw, Apr 24, 2007
(No comment was entered for this change.)
Status: Accepted
Owner: gwt.team.jgw
Labels: Milestone-1_4_RC
Comment 7 by gwt.team.bruce, May 23, 2007
Removing the 1.4 RC label from issues we know won't be able to make it into
1.4 RC. If they end up being super-critical, we can possibly pull them in
before 1.4 Final (but that should be only a last resort).
Labels: -Milestone-1_4_RC
Comment 8 by david.nouls, Jul 02, 2007
I have the same issue:
I have a menu on top of a Frame object.
When the user opens the menu, the menu does not close when the user clicks on the 
Frame object. Only if you click somewhere else the menu will disappear.
See attachment for example.
I guess that the problem is because no events are handled on this Frame so the 
EventPreview mechanism does not detect the click.

FrameMenuTest.zip
3.3 KB   Download
Comment 9 by jgw+personal@google.com, Apr 09, 2008
I'm marking this for 1.5 because I really want to try and fix it; Be warned, however,
that this may be impossible in the general case.
Owner: j...@google.com
Cc: -gwt.team.jgw
Labels: Milestone-1_5_RC
Comment 10 by jgw+personal@google.com, Jun 11, 2008
(No comment was entered for this change.)
Labels: -Milestone-1_5_RC Milestone-Planned
Comment 11 by sethfromaustria, Sep 15, 2008
I have the same problem with a SuggestBox's popup and iframes. The popup just doesn't
close on clicking on the iframe. While debugging I found out that onEventPreview
isn't fired when I click on the iframe and that's why the popup (which by the way is
configured autoClose=true) doesn't close.

The MenuBar uses the same mechanism for submenus like the SuggestBox for its menu. So
it is the same issue.

Found in GWT 1.5.0
Comment 12 by sethfromaustria, Sep 16, 2008
I just created a workaround for the SuggestBox issue. Take a look at my blog:
http://my.epos4.at/fota/blog/blogid/245_Workaround_for_GWT_Issue_729_in_SuggestBox
Comment 13 by br...@google.com, Oct 21, 2008
(No comment was entered for this change.)
Labels: -priority-medium
Comment 14 by ecc@google.com, Jan 05, 2009
(No comment was entered for this change.)
Status: New
Owner: rj...@google.com
Comment 15 by ecc@google.com, Jan 05, 2009
switching as it looks like an onEventPreview bug actually...
Owner: jlaba...@google.com
Comment 16 by jlabanca+personal@google.com, Jan 05, 2009
I believe the problem is that the events that occur in the iframe do not propagate up
to the window, so the menu never sees them.  We would need a glass panel to cover the
iframes to fix this.
Status: Accepted
Comment 17 by t.broyer, Nov 10, 2009
Looking at Closure's code, I stumbled on this code, which handles "cross-iframe dismissal" of popups, without the 
need for a glass panel:
http://closure-library.googlecode.com/svn/trunk/closure/goog/docs/closure_goog_ui_popupbase.js.source.html#line440
Sign in to add a comment