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
tags/7.4.0.alpha2
Markus Koivisto 10 years ago
parent
commit
3eb261feff
1 changed files with 12 additions and 6 deletions
  1. 12
    6
      client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java

+ 12
- 6
client/src/com/vaadin/client/ui/combobox/ComboBoxConnector.java View File

@@ -50,7 +50,7 @@ public class ComboBoxConnector extends AbstractFieldConnector implements

/*
* (non-Javadoc)
*
*
* @see com.vaadin.client.Paintable#updateFromUIDL(com.vaadin.client.UIDL,
* com.vaadin.client.ApplicationConnection)
*/
@@ -200,11 +200,17 @@ public class ComboBoxConnector extends AbstractFieldConnector implements

getWidget().popupOpenerClicked = false;

// styles have changed or this is our first time - either way we
// need to recalculate the root width.
if (!getWidget().initDone || stylesChanged) {
boolean forceUpdate = true;
getWidget().updateRootWidth(forceUpdate);
/*
* if styles have changed or this is our first time we need to
* recalculate the root width.
*/
if (!getWidget().initDone) {
// 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