Layout reflow does not work correctly in Firefox.
Please look at the pictures.
The “Find” button shows or hides the SearchPanel.
When the SearchPanel is shown, layout does not reflow correctly in Firefox browser (tested in v53 and v65)
Firefox:
It works fine in Chrome
Is there some workaround or fix for this issue?
Smartgwt version v12.0p_2018-12-20/LGPL
theme: Enterprise
Please look at the pictures.
The “Find” button shows or hides the SearchPanel.
When the SearchPanel is shown, layout does not reflow correctly in Firefox browser (tested in v53 and v65)
Firefox:
It works fine in Chrome
Is there some workaround or fix for this issue?
Smartgwt version v12.0p_2018-12-20/LGPL
theme: Enterprise
Code:
package test.formlayout.client.ui; import com.smartgwt.client.util.SC; import com.smartgwt.client.widgets.IButton; import com.smartgwt.client.widgets.events.ClickEvent; import com.smartgwt.client.widgets.events.ClickHandler; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.TextAreaItem; import com.smartgwt.client.widgets.layout.HLayout; import com.smartgwt.client.widgets.layout.VLayout; public class StrategiesTab extends VLayout { public StrategiesTab() { this.setSize("100%", "*"); HLayout templateLayout = new HLayout(); templateLayout.setSize("100%", "*"); final VLayout templateList = new VLayout(); templateList.setBorder("1px solid gray"); templateList.setSize("25%", "99%"); templateList.setShowResizeBar(true); templateLayout.addMember(templateList); final VLayout templateDetails = new VLayout(); templateDetails.setBorder("1px solid gray"); templateDetails.setSize("75%", "99%"); templateLayout.addMember(templateDetails); HLayout topLayout = new HLayout(); topLayout.setSize("100%", "120"); topLayout.setBorder("1px solid gray"); templateDetails.addMember(topLayout); final DynamicForm templatesForm = new DynamicForm(); templatesForm.setSize("100%", "*"); templatesForm.setNumCols(1); templateDetails.addMember(templatesForm); TextAreaItem textArea = new TextAreaItem("textArea"); textArea.setWidth("100%"); textArea.setHeight("*"); //textArea.setTextBoxStyle("strategyTemplate"); textArea.setShowTitle(false); templatesForm.setItems(textArea); HLayout bottomLayout = new HLayout(); bottomLayout.setSize("100%", "30"); bottomLayout.setBorder("1px solid gray"); final IButton findButton = new IButton("Find"); bottomLayout.addMember(findButton); final SearchPanel searchPanel = new SearchPanel(); findButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if (searchPanel.toggleSearch()) findButton.setTitle("Hide Find"); else findButton.setTitle("Find"); reflow(); } }); final IButton consoleButton = new IButton("Console"); bottomLayout.addMember(consoleButton); consoleButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { SC.showConsole(); } }); this.addMember(templateLayout); this.addMember(searchPanel); this.addMember(bottomLayout); } }
Code:
package test.formlayout.client.ui; import com.smartgwt.client.types.TitleOrientation; import com.smartgwt.client.widgets.form.DynamicForm; import com.smartgwt.client.widgets.form.fields.TextItem; import com.smartgwt.client.widgets.layout.HLayout; public class SearchPanel extends HLayout { private TextItem searchItem; public SearchPanel() { setSize("100%", "30"); setBorder("1px solid gray"); searchItem = new TextItem("find", "Find"); searchItem.setTitleOrientation(TitleOrientation.LEFT); searchItem.setWidth(250); searchItem.setBrowserSpellCheck(false); DynamicForm searchForm = new DynamicForm(); searchForm.setNumCols(2); searchForm.setFields(searchItem); addMember(searchForm); HLayout spacer = new HLayout(); spacer.setWidth("*"); addMember(spacer); hide(); } public boolean toggleSearch() { boolean isVisible = false; if (!isVisible()) { show(); searchItem.focusInItem(); isVisible = true; } else { hide(); } return isVisible; } }
Code:
package test.formlayout.client; import com.google.gwt.core.client.EntryPoint; import com.smartgwt.client.types.Side; import com.smartgwt.client.widgets.layout.HStack; import com.smartgwt.client.widgets.layout.VLayout; import com.smartgwt.client.widgets.tab.Tab; import com.smartgwt.client.widgets.tab.TabSet; import test.formlayout.client.ui.StrategiesTab; public class GWTFormLayoutTest implements EntryPoint { public void onModuleLoad() { VLayout mainLayout = new VLayout(); mainLayout.setWidth100(); mainLayout.setHeight100(); VLayout header = new VLayout(); header.setWidth100(); header.setHeight(25); header.setBackgroundColor("blue"); final TabSet mainTabSet = new TabSet(); mainTabSet.setTabBarPosition(Side.TOP); mainTabSet.setWidth100(); mainTabSet.setHeight("*"); Tab tab1 = new Tab("Tab1"); StrategiesTab tabPane = new StrategiesTab(); tabPane.setWidth("100%"); tabPane.setHeight("100%"); tab1.setPane(tabPane); mainTabSet.addTab(tab1); HStack footer = new HStack(); footer.setWidth100(); footer.setHeight(20); footer.setBackgroundColor("blue"); mainLayout.setMembers(header, mainTabSet, footer); mainLayout.draw(); } }
Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.6.1//EN" "file:///C:/lib/gwt-2.6.1/gwt-module.dtd"> <module rename-to='gwtformlayouttest'> <!-- Inherit the core Web Toolkit stuff. --> <inherits name='com.google.gwt.user.User'/> <!-- Other module inherits --> <inherits name="com.smartgwt.SmartGwtNoTheme"/> <inherits name="com.smartgwt.tools.SmartGwtTools" /> <inherits name="com.smartclient.theme.enterprise.Enterprise"/> <!-- Specify the app entry point class. --> <entry-point class='test.formlayout.client.GWTFormLayoutTest'/> <!-- Specify the paths for translatable code --> <source path='client'/> <source path='shared'/> <!-- allow Super Dev Mode --> <!-- <add-linker name="xsiframe"/> --> </module>
Comment