Browse Source

Treat initial rendering and style changes separately. (#13444)

This fixes a regression caused by a previous patch, which led to empty comboboxes being initialised with a zero width.

Change-Id: I7e5ca0c563625c453e0e3006d91ed52ad227d6f0

Conflicts:
	client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java
tags/7.2.1
Markus Koivisto 10 years ago
parent
commit
b3d683e974
1 changed files with 10 additions and 1 deletions
  1. 10
    1
      client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java

+ 10
- 1
client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java View File

@@ -207,8 +207,17 @@ public class ComboBoxConnector extends AbstractFieldConnector implements

getWidget().popupOpenerClicked = false;

/*
* if styles have changed or this is our first time we need to
* recalculate the root width.
*/
if (!getWidget().initDone) {
getWidget().updateRootWidth();
// no need to force update since we have no existing width
getWidget().updateRootWidth(false);
} else if (stylesChanged) {
// we have previously calculated a width, we must force an update
// due to changed styles
getWidget().updateRootWidth(true);
}

// Focus dependent style names are lost during the update, so we add

Loading…
Cancel
Save