Announcement

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

    Hiding a layout and later making it visible messes up grouping frame

    Hiding a layout and later making it visible is causing the grouping frame to not show properly. The top of the grouping frame gets chopped. The group title is also not aligned properly.
    Following is the code which can be used to reproduce this problem.

    Code below uses a timer to make the layout visible after 5 seconds. Note that if you comment out the line "layout2.hide()" then it draws the grouping frame properly.

    Please also note that were seeing this issue Chrome 55.0.2883.95 (64-bit) running on Macbook Pro OS version 10.11.6 ( El Capitan ). Issue is seen on multiple systems.
    Issue does not appear if we use the latest FireFox.
    We are using SmartGWT 5.1 built on 2016 09 16

    We also think that the issue started happening after a recent Chrome update. We do not remember seeing this issue before.


    public void onModuleLoad()
    {

    VLayout main = new VLayout();
    main.setWidth100();
    main.setHeight100();

    HLayout layout1 = new HLayout();
    layout1.setBackgroundColor("#F1F1F1");
    layout1.setHeight(40);
    layout1.setOverflow(Overflow.VISIBLE);

    final HLayout layout2 = new HLayout();
    layout2.setIsGroup(true);
    layout2.setGroupTitle( "Test" );
    layout2.setMargin(2);


    main.addMembers( layout1, layout2 );

    layout2.hide();

    Timer refreshTimer = new Timer() {

    @Override
    public void run() {
    layout2.show();
    }
    };
    refreshTimer.scheduleRepeating(5000);

    RootLayoutPanel.get().add(main);
    }
    Last edited by msdhedhi007; 9 Jan 2017, 12:05.

    #2
    Use draw(), not RootPanel.add() (see QuickStart Guide). Also, please retest with the latest patched build.

    If the issue occurs anyway, let us know.

    Comment


      #3
      Hello Isomorphic,
      I made the changes as suggested but still see the same issue. The issue is also seen on latest Chrome on Windows 8.1 ( Earlier I was testing on macbook pro ).
      Issue does not occur on older Chrome, latest IE browser or latest FireFox.
      I tried it with the latest 5.1 build ( i.e. from Jan 10, 2017 ) and the issue exists.
      I also tried it with the latest 6.0 build and still see the same issue.

      Comment


        #4
        We have tried to reproduce the problem in our local development environments, to no avail.
        We have tested with SGWT versions 5.1, 6.0p and 6.1d, using Chrome 55 on Windows 8.1 an Ubuntu 16.04.

        As a final suggestion, have you checked that your HTML page has DOCTYPE? You can check our FAQ (http://forums.smartclient.com/forum/...-smart-gwt-faq) for details.

        Comment


          #5
          Hi Isomorphic,
          I went through the FAQ but could not figure out why the border around the layout is clipped from the top.

          I created a video of what I am seeing on latest chrome ( version 55.0.2883.95 ) and put it at http://www.dhedhi.com/smartgwt_test/chrome.mov
          In the video, you will see that the bottom layout has a border but is clipped from the top.

          The same code works fine on firefox ( http://www.dhedhi.com/smartgwt_test/firefox.mov )

          I also uploaded the compiled project at http://www.dhedhi.com/smartgwt_test/index.html so you can view it in browser and see it yourself

          The code for the project can be downloaded from http://www.dhedhi.com/smartgwt_test/smartgwttest.tgz

          Comment


            #6
            We see the issue too. Thanks. We're working on a solution, and will update this thread when it's been committed.

            Comment


              #7
              This should now be resolved for SGWT 5.1p and newer releases, and the sample code you provided should behave properly. It should be in the nightly builds dated 2-18-2017 and beyond.

              Comment

              Working...
              X