Announcement

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

    UploadItem - column size problem

    UploadItem in FireFox changes column size of DynamicForm. If you try to upload file with long name (e.g. aaaaaaaaaaaaaaaaaaaasssssssssssssssssssssssssssssdddddddddddddddddddddddddffffffffffffffffffffffffffffff.txt) UploadItem changes column width despite of width defined in DynamicForm. In Internet Explorer UploadItem does not change width. Is there any solution?

    Code:
    	@Override
    	public void onModuleLoad()
    	{
    		TextItem text = new TextItem("textItem", "Name");
    		UploadItem upload = new UploadItem("uploadItem", "File");
    		StaticTextItem staticText = new StaticTextItem("staticItem",
    				"Static text");
    
    		final DynamicForm form = new DynamicForm();
    		form.setColWidths(100, 300);
    		form.setItems(text, upload, staticText);
    
    		IButton button = new IButton();
    		button.addClickHandler(new ClickHandler()
    		{
    			@Override
    			public void onClick(ClickEvent aEvent)
    			{
    				Window window = new Window();
    				window.setHeight(200);
    				window.setWidth(400);
    				window.addItem(form);
    				window.centerInPage();
    				window.show();
    			}
    		});
    
    		// layout
    		VLayout layout = new VLayout();
    		layout.setOverflow(Overflow.AUTO);
    		layout.setWidth100();
    		layout.setHeight100();
    		layout.setDefaultLayoutAlign(Alignment.CENTER);
    		layout.setTop(100);
    		layout.setMembers(button);
    		layout.draw();
    	}
    Attached Files

    #2
    It looks like Firefox recently introduce a behavior where it will show the full name of the uploaded file by default, and now respects a width specified in the DOM (it used to just ignore attempts to set width).

    We've now changed things so that in versions of Firefox where width can be set, we do set it - this change will be available in tomorrow's builds.

    Comment

    Working...
    X