Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Timeline context menu not disappearing

    I have the following testcase. It may appear unnecessary to have all these buttons, but I need these for reproducing the problem.

    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;
            }
        }
    
    }
    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)

    #2
    Isomorphic have you been able to reproduce the issue?

    Comment


      #3
      Yes, we have - it's a modality issue, the result of layered clickmasks - it hasn't yet been fixed, but we'll update here when it is, in the coming days.

      Comment


        #4
        Ok please let me know, since I have been waiting for a bunch of bugs with the timelines to be corrected and in order to continue developing on this I need all these fixed.

        Comment


          #5
          This is a complex clickMask issue and will take some time to address - we'll update here when we have a fix.

          Comment


            #6
            Note that, apart from this issue (which is not Timeline-specific, and which we noted is going to take some time to fix) and your other post entitled "Timeline one day", to which we replied on Monday of this week, we're not aware of any other reports that you're awaiting fixes for. We're not sure whether you've tested any of the fixes we've put in for you, because you haven't confirmed any of them - but let us know if you think there are others we've missed.
            Last edited by Isomorphic; 24 Aug 2016, 02:40.

            Comment


              #7
              Apologies for the delay on this one - in the end, there's not actually a bug here. What's happening is that you show a menu, in which is menuItem with an embeddedComponent button - the problem is that clicking that embedded component button does not fire a click on the menuItem that contains it, so autoDismiss has no effect - your first menu remains visible and with its clickMask up.

              The fix is just to call menu.hideAllMenus() from your "click" button, before new Window().

              Comment

              Working...
              X