I have the following testcase. It may appear unnecessary to have all these buttons, but I need these for reproducing the problem.
Steps:
1. click "show window" button
2. click "edit" button
3. click "click" button
4. right click on a week header. The context menu appears
5. click on "columns" in the context menu. The column list appears.
6. click anywhere else. The column list never disappears.
Using smartgwt 6.0-p20160813 power and chrome 51.0.2704.103 (64-bit)
Code:
public class TestingModule implements EntryPoint { public void onModuleLoad() { IButton showButton = new IButton("show window"); showButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { new MyWindow2().show(); } }); VLayout vlayout = new VLayout(); vlayout.addMember(showButton); vlayout.draw(); } private class MyWindow extends Window { private VLayout timelaneContainer; private Timeline calendar; public MyWindow() { setTitle("urlaub"); setAutoCenter(true); setIsModal(true); setShowModalMask(true); setShowMaximizeButton(true); setWidth(1460); setHeight(400); addCloseClickHandler(new CloseClickHandler() { @Override public void onCloseClick(CloseClickEvent event) { markForDestroy(); } }); VLayout vlayout = new VLayout(5); vlayout.setPadding(25); createCalendar(); vlayout.addMember(timelaneContainer); addItem(vlayout); } private void createCalendar() { timelaneContainer = new VLayout(); timelaneContainer.setHeight("50%"); calendar = new Timeline(); calendar.setHeight(200); calendar.setStartDate(new Date(112, 5, 2)); calendar.setEndDate(new Date(112, 5, 22)); calendar.setCanEditLane(true); calendar.setShowEventDescriptions(false); HeaderLevel[] headerLevels = new HeaderLevel[] { new HeaderLevel(TimeUnit.WEEK), new HeaderLevel(TimeUnit.DAY) }; calendar.setHeaderLevels(headerLevels); calendar.setLaneFields(new ListGridField[] { new ListGridField("title", "Developer", 120) }); calendar.setLanes(TimelineLaneData.getRecords()); calendar.setData(TimelineData.getRecords()); calendar.setCanEditLane(false); timelaneContainer.addMember(calendar); } } class MyWindow2 extends Window { MyWindow2() { setTitle("urlaub"); setAutoCenter(true); setIsModal(true); setShowModalMask(true); setShowMaximizeButton(true); setWidth(500); setHeight(500); VLayout vlayout = new VLayout(); IMenuButton bearbeitenButton = createBearbeitenButton(); vlayout.addMember(bearbeitenButton); addItem(vlayout); } private IMenuButton createBearbeitenButton() { final Menu menu = new Menu(); menu.setWidth(570); menu.setAutoDraw(false); IButton abwesendheitButton = new IButton("click"); abwesendheitButton.setHeight(24); abwesendheitButton.setWidth(303); abwesendheitButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { markForDestroy(); new MyWindow().show(); } }); final VStack editButtons = new VStack(5); editButtons.setDefaultLayoutAlign(VerticalAlignment.CENTER); editButtons.setSnapTo("TR"); editButtons.setAutoDraw(false); editButtons.setStyleName("bearbeitenPersonMenuPadding"); final HStack editSecondLayerButtons = new HStack(3); editSecondLayerButtons.setHeight(24); editSecondLayerButtons.setMembers(abwesendheitButton); editButtons.setMembers(editSecondLayerButtons); final MenuItem editMenuItem = new MenuItem("change"); editMenuItem.setShowRollOver(false); editMenuItem.setEmbeddedComponentFields("key"); editMenuItem.setEmbeddedComponent(editButtons); menu.setData(new MenuItemSeparator(), editMenuItem); final IMenuButton erstellenButton = new IMenuButton("edit", menu); erstellenButton.setWidth(100); erstellenButton.setAutoDraw(false); erstellenButton.setBaseStyle("buttonRounded"); erstellenButton.setHeight(28); return erstellenButton; } } }
1. click "show window" button
2. click "edit" button
3. click "click" button
4. right click on a week header. The context menu appears
5. click on "columns" in the context menu. The column list appears.
6. click anywhere else. The column list never disappears.
Using smartgwt 6.0-p20160813 power and chrome 51.0.2704.103 (64-bit)
Comment