PDA

View Full Version : Menu throws JS error



Raziel
17 Apr 2009, 11:23 AM
Clicking outside a rendered Menu produces a JS error, when the menu is poped-up from a button using the show() method.

- GXT version 1.2.3
- GWT 1.6
- both
- IE 7
- Windows XP

Sample code:




public class Test implements EntryPoint {
public void onModuleLoad() {
final LayoutContainer mainPanel = new LayoutContainer(new RowLayout());

Button pullButton = new Button("button");
mainPanel.add(pullButton);

final Menu appMenu = new Menu();
MenuItem insert = new MenuItem();
insert.setText("Insert Item");
appMenu.add(insert);
MenuItem remove = new MenuItem();
remove.setText("Remove Selected");
appMenu.add(remove);

pullButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
appMenu.show(ce.button);
}
});

RootPanel.get("gwtContent").add(mainPanel);
}
}

Clicking on the button will show the menu. Clicking again over the button or anywhere outside the menu will produce a JS error (with event handling code it seems). Clicking on any of the menu items works though.

sven
17 Apr 2009, 3:07 PM
Please stay with GWT 1.5.3 for GXT 1.2.3 for now.