In short, it seems that calling TabDeselectedEvent.cancel() in a TabDeslectedHandler causes the event to be fired again - once on Firefox 11 and twice on IE9. See the following for a test case tried with 3.0p 2012-06-08 and 3.1p 2012-06-28.
Bug?
Bug?
Code:
public void onModuleLoad() { VLayout layout = new VLayout(); layout.setWidth100(); layout.setHeight100(); final TabSet tabset = new TabSet(); Tab t1 = new Tab("Tab 1"); Tab t2 = new Tab("Tab 2"); TabDeselectedHandler td = new TabDeselectedHandler() { public void onTabDeselected(TabDeselectedEvent event) { GWT.log(event.getTab().getTitle()); event.cancel(); } }; tabset.addTabDeselectedHandler(td); tabset.setTabs(t1, t2); layout.addMember(tabset); layout.draw(); /* * enable the sgwt debug console in development mode */ if (!GWT.isScript()) { KeyIdentifier debugKey = new KeyIdentifier(); debugKey.setCtrlKey(true); debugKey.setAltKey(true); debugKey.setKeyName("D"); Page.registerKey(debugKey, new KeyCallback() { public void execute(String keyName) { SC.showConsole(); } }); }
Comment