Announcement

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

    Selectitem shows scrollbar when item width is set (IE 10)

    Browser: IE10
    SmartGwt version : 3.1p

    When setting the width of the selectitem as selectitem .setWidth("*"); or selectitem .setPickListWidth(200); , scrollbars are introduced in the selectitem. If there is only one value in the item, the horizontal scroll bar makes it impossible to read the value. Scrollbars are introduced only if width is set.

    Does not happen in IE9/FF.

    Is there a fix/workaround for this issue?

    #2
    Please see the FAQ: this issue occurs if you have third-party CSS in your application (for instance from inheriting one of GWT's default themes), or could also occur if you are not using the HTML5 DOCTYPE with IE9/10 (which is required since MS crippled the browser for all other modes).

    Comment


      #3
      I have added <!DOCTYPE html> to my page. Also, I don't think I am have any third party css in my application. IE9 works fine. The issue is only in IE10, that too only when I set the width.

      Comment


        #4
        Then we'll need a way to reproduce the issue. Try modifying a sample to see if you can cause it to happen, then post your modifications here.

        Comment


          #5
          SelectItem item = new SelectItem();
          item.setWidth("*");
          item.setValueMap(new String[]{"TEST"});

          DynamicForm form = new DynamicForm();
          form.setFields(item);

          Comment


            #6
            Hi Isomorphic ... Any luck reproducing the issue?

            Comment


              #7
              Could you please give me an update on the issue. Was it reproducible? Is this an issue in smartgwt or am I doing something wrong? Please let me know if you need any more info from my side.

              Comment


                #8
                Sorry for the silence on this - we are having trouble reproducing the issue with a basic test case like this:
                Code:
                import com.google.gwt.core.client.EntryPoint;
                import com.smartgwt.client.widgets.form.DynamicForm;
                import com.smartgwt.client.widgets.form.fields.SelectItem;
                
                public class ScrollbarSelectTest implements EntryPoint {
                	public void onModuleLoad() {
                		SelectItem item = new SelectItem();
                		item.setWidth("*");
                		item.setValueMap(new String[]{"TEST"});
                
                		DynamicForm form = new DynamicForm(); 
                		form.setFields(item);
                		form.draw();
                
                	}
                
                }
                Are you able to reproduce with the above simple entry point? If not, could you show us enough code to reproduce the problem?

                Other than that, can you confirm exactly which build you're using (including the date). Does this occur if you try the latest nightly build?
                Can you show us your .gwt.xml file "inherits" blocks and your bootstrap file "script src=" blocks? (We're interested in which skin you are using, etc).

                Regards
                Isomorphic Software

                Comment


                  #9
                  Here is the sample code to reproduce (the grid also shows a scrollbar when width is set to 100%, so added that case too):

                  import com.google.gwt.core.client.EntryPoint;
                  import com.smartgwt.client.widgets.form.DynamicForm;
                  import com.smartgwt.client.widgets.form.fields.SelectItem;
                  import com.smartgwt.client.widgets.grid.ListGrid;
                  import com.smartgwt.client.widgets.layout.HLayout;
                  import com.smartgwt.client.widgets.layout.VLayout;

                  public class SmartGwtScrollBarTest implements EntryPoint {
                  public void onModuleLoad() {

                  VLayout vPanel = new VLayout();
                  vPanel.setPadding(10);
                  vPanel.setMembersMargin(15);
                  vPanel.setWidth(500);
                  vPanel.setHeight(400);
                  vPanel.setBorder("1px solid red");

                  HLayout formPanel = new HLayout();
                  formPanel.setWidth(500);
                  formPanel.setHeight(100);
                  formPanel.setBorder("1px dotted green");

                  SelectItem item = new SelectItem();
                  item.setWidth("*");
                  item.setValueMap(new String[]{"TEST"});

                  DynamicForm form = new DynamicForm();
                  form.setWidth100();
                  form.setFields(item);

                  formPanel.addMember(form);

                  HLayout gridPanel = new HLayout();
                  gridPanel.setWidth(500);
                  gridPanel.setHeight(250);
                  gridPanel.setBorder("1px dotted blue");

                  ListGrid grid = new ListGrid();
                  grid.setWidth100();
                  grid.setHeight100();

                  gridPanel.addMember(grid);

                  vPanel.addMember(formPanel);
                  vPanel.addMember(gridPanel);
                  vPanel.draw();
                  }

                  }

                  SmartGwt version I was using : Version v8.3p_2013-08-01/Enterprise Deployment (2013-08-01)
                  Tried it with the nightly build, Version v8.3p_2013-08-08/Enterprise Deployment (2013-08-08) ... same effect

                  My inherits:
                  <!-- GWT -->
                  <inherits name="com.google.gwt.user.User" />
                  <inherits name="com.google.gwt.core.Core" />
                  <inherits name="com.google.gwt.user.History" />
                  <inherits name="com.google.gwt.i18n.I18N" />
                  <inherits name="com.googlecode.gwt.commons.logging.GWTLogCommonsLogging"/>
                  <!-- GWT-Ext -->
                  <inherits name="com.gwtext.GwtExt" />
                  <!-- Smart GWT -->
                  <inherits name="com.smartgwt.SmartGwtNoScript"/>
                  <!-- include this for the dev console-->
                  <inherits name="com.smartgwt.tools.SmartGwtTools"/>
                  <!-- Smart GWT Skins-->
                  <inherits name="com.smartgwt.SmartGwtNoTheme"/>
                  <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>

                  My skin and script src block:
                  <script type="text/javascript" src="sc/initsc.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_Core.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_Foundation.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_Containers.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_Grids.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_Forms.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_Calendar.js"></script>
                  <script type="text/javascript" src="sc/modules/ISC_DataBinding.js"></script>
                  <script type="text/javascript" src="sc/skins/EnterpriseBlue/load_skin.js"></script>

                  Please let me know if you need some other info.

                  Comment


                    #10
                    We're still unable to get this to happen on our end.
                    A few comments / notes from what you've shown us so far:

                    This "inherits" block is slightly wrong:
                    Code:
                    <!-- Smart GWT -->
                    <inherits name="com.smartgwt.SmartGwtNoScript"/>
                    <!-- include this for the dev console-->
                    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
                    <!-- Smart GWT Skins-->
                    <inherits name="com.smartgwt.SmartGwtNoTheme"/>
                    <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>
                    Inheriting SmartGWTNoScript will ensure all the SmartClient resources are available, but will not load any script files automatically -- this means you need to explicitly write out <script src=... > tags into your bootstrap HTML file.
                    Inheriting SmartGWTNoTheme will also ensure al the SmartClient resources are loaded, and will load the module script files, (but will not load the skin file).
                    You don't need both of these blocks. Since you're already explicitly writing out the <script src=...> blocks in your HTML file to load the SmartClient modules, we'd recommend you remove the "SmartGWTNoTheme" block from your .gwt.xml file.

                    --

                    It looks like your <script src=...> tags all are looking in the directory "sc/" (local to the bootstrapfile).
                    In a standard setup, the "sc" file is actually under a subdirectory (named after the project - for example the showcase loads source from "showcase/sc/modules/ISC_Core.js", etc).
                    This probably wouldn't be causing you problems due to the "SmartGWTNoTheme" inherit which takes care of loading the js source directly, but when you get rid of that inherit, you should also fix the paths as what you currently have is likely 404'ing

                    --

                    We notice you're loading GWT-Ext before loading SmartGWT. If you get rid of that inherit, does this have any effect on the problem?

                    --
                    If none of these resolve the issue for you, let us know.

                    Thanks
                    Isomorphic Software

                    Comment


                      #11
                      Oh - a couple of additional notes:
                      1) Does this happen in both development mode and compiled mode? In other words, if you do a full gwt compile and access the app without the "gwt.codesvr" parameter, do you still see the problem?

                      2) If you explicitly clear your browser cache and refresh the app, does this change behavior in any way?

                      3) Is there anything "intermittent" about this issue for you? If you have access to another machine with IE10, can you see the problem there? What about if you change the size of the browser window? Are there any other browser settings like zoom, document mode set by the f12 developer tools, etc which might impact this?

                      Thanks

                      Comment


                        #12
                        Followed all your instructions, still no luck. fyi, it happens only in ie10. Works fine in all the other browsers.

                        Comment


                          #13
                          Try completely removing the GWT-Ext inherit. It probably includes CSS as we originally mentioned.

                          Comment


                            #14
                            1) Does this happen in both development mode and compiled mode? In other words, if you do a full gwt compile and access the app without the "gwt.codesvr" parameter, do you still see the problem?
                            Yes, happens in both the mode.

                            2) If you explicitly clear your browser cache and refresh the app, does this change behavior in any way?
                            No, its the same

                            3) Is there anything "intermittent" about this issue for you? If you have access to another machine with IE10, can you see the problem there? What about if you change the size of the browser window? Are there any other browser settings like zoom, document mode set by the f12 developer tools, etc which might impact this?
                            - When I access from another machine with IE10, I do not see the extra scroll bars at few places. They are still there at many other places.
                            - When I resize the browser window, the scrollbar sometimes disappear and sometimes appear back (for the listgrid)
                            - using standard mode so that wouldn't have an adverse effect, right?

                            I will try by removing the gwt-ext inherit completely and get back to you by tomorrow.

                            Comment


                              #15
                              Won't be able to remove gwt-ext inherit. We use it in the app.

                              I checked the css, it almost the same for FF and IE10, just difference in the height and width of the element. Also, I don't think the css is getting inherited from gwt-ext's css.

                              Comment

                              Working...
                              X