PDA

View Full Version : [FIXED] Popup hides when click occurs on Widget in the Popup, not the Popup body



adam.schwartz
13 Aug 2008, 7:43 AM
I have a Popup with lots of Widgets inside of it, including DataLists. When I select an item in a data list, the Popup autohides.

Latest ExtGWT from SVN
Both hosted and Web mode
FF3 on Ubuntu Hardy

Some sample code


DataList list = new DataList();
list.add( new DataListItem("Test 1") );
list.add( new DataListItem("Test 2") );
LayoutContainer inner = new LayoutContainer();
inner.add( list );

Popup navPopup = new Popup();
navPopup.setLayout(new FitLayout());
navPopup.add( inner );
- I would guess the BaseEventPreview in the Popup class isn't doing the right thing on line 88, but it may just be my case. Instead of


if (ce.getTarget() == XDOM.getBody()) {... using the following bit cured my issues ...


if (DOM.isOrHasChild(Popup.this.getElement(), ce.getTarget()) ) {Of course, I don't know if this is the best way to solve it or not, but thought I'd bring it up.

Cheers,
Adam

darrellmeyer
13 Aug 2008, 11:01 AM
Fix is in SVN.