Thursday, May 29, 2014

Strange behavior of Chrome 35.0.1916 on Windows 7 when add/remove style of HTMLPanel


I ran into very strange behaviour, which happens only in chrome 35/win 7. I use ListBox to change color of HTMLPanel with CssResource. When we change the value in the ListBox, the color of the panel should be changed but nothing happens, when we check the style via "Inspect Element"  the style was changed but visually not applied. Everything works fine until update to version Chrome 35.

Is anyone encounter the same problem? Any Ideas why when we change the style using addStyle()/removeStyle() the new style does not take affect?

I have no problems with Firefox

I use UIBibder.

public class SelectorImpl extends Composite {


ListBox listBox;


HTMLPanel panel;

interface Style extends CssResource {

String red();

String green();



Style style;

private Map<Integer, String> colorsMap = new HashMap<Integer, String>();

private String currentColor;

public EmployeeAttendanceSchedulerViewImpl() {


.put(1, ;






public void onListSelected(ChangeEvent event){


=  colorsMap.get(listBox.getSelectedIndex());




In ui.xml

<ui:style type="com.SelectorImpl.Style">

    .red {

      background-color: #FF0000;


    .green {

       background-color: #00FF00;


    .panelBoxStyle {

      box-sizing: border-box;

      border: solid 1px;

      width: 40px;

      height: 19px;




<g:ListBox ui:field="listBox"/>

<g:HTMLPanel ui:field="panel" styleName="{style.panelBoxStyle}"/>


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
For more options, visit

No comments:

Post a Comment