Announcement

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

    TextAreaItem + ReadOnlyDisplayAppearance.DISABLED inconsistent browser behaviour

    Hi Isomorphic,

    please see the following test case (SNAPSHOT_v10.1d_2015-04-09, Simplicity skin):
    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.data.Criteria;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.types.ReadOnlyDisplayAppearance;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.widgets.form.fields.ComboBoxItem;
    import com.smartgwt.client.widgets.form.fields.SelectItem;
    import com.smartgwt.client.widgets.form.fields.SpinnerItem;
    import com.smartgwt.client.widgets.form.fields.TextAreaItem;
    import com.smartgwt.client.widgets.form.fields.TextItem;
    import com.smartgwt.client.widgets.layout.VStack;
    
    public class BuiltInDS implements EntryPoint {
    	private DynamicForm boundForm;
    	private TextItem scientificName;
    	private TextItem commonName;
    	private SelectItem status;
    	private ComboBoxItem status2;
    	private SpinnerItem lifeSpan;
    	private TextAreaItem information;
    
    	public void onModuleLoad() {
    		KeyIdentifier debugKey = new KeyIdentifier();
    		debugKey.setCtrlKey(true);
    		debugKey.setKeyName("D");
    
    		Page.registerKey(debugKey, new PageKeyHandler() {
    			public void execute(String keyName) {
    				SC.showConsole();
    			}
    		});
    
    		VStack vStack = new VStack();
    		vStack.setLeft(175);
    		vStack.setTop(75);
    		vStack.setWidth("70%");
    		vStack.setMembersMargin(20);
    
    		
    		boundForm = new DynamicForm() {
    			{
    				setDataSource(DataSource.get("animals"));
    				setReadOnlyDisplay(ReadOnlyDisplayAppearance.DISABLED);
    				setCanEdit(false);
    
    				commonName = new TextItem("commonName");
    				scientificName = new TextItem("scientificName");
    				status = new SelectItem("status");
    				status2 = new ComboBoxItem("status");
    				lifeSpan = new SpinnerItem("lifeSpan");
    				information = new TextAreaItem("information");
    				information.setHeight(100);
    				setFields(commonName, scientificName, status, status2, lifeSpan, information);
    			}
    		};
    		vStack.addMember(boundForm);
    		vStack.draw();
    		boundForm.fetchData(new Criteria("scientificName", "Loxodonta africana"));
    	}
    }
    For me, the information-TextAreaItem behaves differently in browsers:
    • FF26: Scrolling disabled via scrollbars and mouse-wheel and mouse-click-text-select-draw.
    • GC42: Scrolling disabled mouse-wheel and mouse-click-text-select-draw. Scrollbars enabled.
    • IE11: Scrolling disabled via scrollbars and mouse-wheel. Enabled via mouse-click-text-select-draw.

    I like the GC behaviour the best.

    Best regards
    Blama

    #2
    We agree.

    Unfortunately, these are native behaviors, and not things we can change.

    Comment


      #3
      Ok, too bad. Would it be different with Enterprise skin instead of Simplicity? As far as I understood in Enterprise there are SmartGWT Widgets used that mimick scrollbars, but no native scrollbars.

      Best regards
      Blama

      Comment


        #4
        This doesn't differ by skin. TextArea scrollbars are unique: in all skins, we use the browser native scrollbars, because using synthetic scrollbars would be a lot heavier weight and would run into a forest of browser bugs related to text sizing and text reflow.

        Comment


          #5
          Ok, understood. Thanks for the VERY FAST clarifications.

          I'll answer this somehow related thread tomorrow.

          Best regards
          Blama

          Comment

          Working...
          X