Hi,
I guess I found a bug which only appears with Chrome in combination with an Linux OS. Linux and Firefox is working great as well as Windows and Chrome. When you use Chrome + Linux you are constantly loosing the item focus on various spots. For example check the code on the bottom. When I click on the "MiniDateRangeItem" item in my form. The "DateRange Pop Up"... then I start entering "01.01.2" then it looses the focus. This happens exactly when on right side the info text "(01.01.2002)" appears (besides the calendar Icon). Some weeks ago this was working very well. But since a couple of weeks it constantly appears.
P.S.: This MiniDateRange field is just an example. This problem appears on various other spots and Dynamic Forms. Seems that the focus always went lost when another process is triggered after drawing (e.g. set form fields disabled).
Thanks
Andy
See the Screenshot:
Not Working combination:
Used SmartGWT: https://www.smartclient.com/builds/S...GPL/2017-11-08
Browser: Chrome 62
OS: LInux Mint 18.2
Code example:
I guess I found a bug which only appears with Chrome in combination with an Linux OS. Linux and Firefox is working great as well as Windows and Chrome. When you use Chrome + Linux you are constantly loosing the item focus on various spots. For example check the code on the bottom. When I click on the "MiniDateRangeItem" item in my form. The "DateRange Pop Up"... then I start entering "01.01.2" then it looses the focus. This happens exactly when on right side the info text "(01.01.2002)" appears (besides the calendar Icon). Some weeks ago this was working very well. But since a couple of weeks it constantly appears.
P.S.: This MiniDateRange field is just an example. This problem appears on various other spots and Dynamic Forms. Seems that the focus always went lost when another process is triggered after drawing (e.g. set form fields disabled).
Thanks
Andy
See the Screenshot:
Not Working combination:
Used SmartGWT: https://www.smartclient.com/builds/S...GPL/2017-11-08
Browser: Chrome 62
OS: LInux Mint 18.2
Code example:
Code:
import java.util.LinkedHashMap; import com.smartgwt.client.types.Overflow; import com.smartgwt.client.types.TitleOrientation; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.Window; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.ButtonItem; import com.smartgwt.client.widgets.form.fields.MiniDateRangeItem; import com.smartgwt.client.widgets.form.fields.RowSpacerItem; import com.smartgwt.client.widgets.form.fields.SelectItem; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.layout.VLayout; public class GTestForm { public GTestForm() { initGui(); } private void initGui() { VLayout layout = new VLayout(); layout.setSize( "100%", "100%" ); layout.setMembers( getEditorForm() ); layout.setOverflow( Overflow.HIDDEN ); Window window = new Window(); window.setOverflow( Overflow.HIDDEN ); window.setSize( "50%", "50%" ); window.setCanDragResize( true ); window.setShowMaximizeButton( true ); window.setShowMinimizeButton( true ); window.setShowCloseButton( false ); window.setAnimateMinimize( true ); window.setShowCloseButton( true ); window.setModalMaskOpacity( 25 ); window.setIsModal( true ); window.setShowModalMask( true ); window.centerInPage(); window.addItem( layout ); window.draw(); } private DynamicForm getEditorForm() { TextItem txtItem = new TextItem( "Text" ); txtItem.setWidth( 200 ); txtItem.setTitle( "Test" ); MiniDateRangeItem miniDateRangeItem = new MiniDateRangeItem( "mdri" ); miniDateRangeItem.setWidth( 200 ); miniDateRangeItem.setTitle( "Date" ); final SelectItem comboTest = new SelectItem( "Test" ); comboTest.setEmptyDisplayValue( "All" ); comboTest.setRequired( true ); comboTest.setAllowEmptyValue( true ); comboTest.setTitleOrientation( TitleOrientation.TOP ); comboTest.setTitle( "Test" ); comboTest.setWidth( 200 ); comboTest.addClickHandler( new com.smartgwt.client.widgets.form.fields.events.ClickHandler() { @Override public void onClick( com.smartgwt.client.widgets.form.fields.events.ClickEvent event ) { LinkedHashMap<String, String> items = new LinkedHashMap<String, String>(); items.put( "1", "Value1" ); items.put( "2", "Value2" ); items.put( "3", "Value3" ); comboTest.setValueMap( items ); SC.say( "ValueMapSize: " + items.size() ); } } ); LinkedHashMap<String, String> initialItems = new LinkedHashMap<String, String>(); initialItems.put( "1", "initialValue100" ); initialItems.put( "2", "initialValue200" ); initialItems.put( "3", "initialValue300" ); final SelectItem comboTest2 = new SelectItem( "Test2" ); comboTest2.setEmptyDisplayValue( "All" ); comboTest2.setRequired( true ); comboTest2.setAllowEmptyValue( true ); comboTest2.setTitleOrientation( TitleOrientation.TOP ); comboTest2.setTitle( "Test" ); comboTest2.setWidth( 200 ); comboTest2.setValueMap( initialItems ); comboTest2.setDefaultToFirstOption( true ); comboTest2.addClickHandler( new com.smartgwt.client.widgets.form.fields.events.ClickHandler() { @Override public void onClick( com.smartgwt.client.widgets.form.fields.events.ClickEvent event ) { LinkedHashMap<String, String> items = new LinkedHashMap<String, String>(); items.put( "1", "Value1" ); items.put( "2", "Value2" ); items.put( "3", "Value3" ); comboTest2.setValueMap( items ); } } ); ButtonItem buttonConsole = new ButtonItem(); buttonConsole.setTitle( "Dev. Console" ); buttonConsole.setWidth( 125 ); buttonConsole.setHeight( 25 ); buttonConsole.addClickHandler( new com.smartgwt.client.widgets.form.fields.events.ClickHandler() { @Override public void onClick( com.smartgwt.client.widgets.form.fields.events.ClickEvent event ) { SC.showConsole(); } } ); DynamicForm editorForm = new DynamicForm(); editorForm.setAutoFocus( true ); editorForm.setWidth100(); editorForm.setMargin( 25 ); editorForm.setFields( miniDateRangeItem, new RowSpacerItem(), txtItem, new RowSpacerItem(), comboTest, new RowSpacerItem(), comboTest2, new RowSpacerItem(), new RowSpacerItem(), buttonConsole ); editorForm.editNewRecord(); return editorForm; } }
Comment