From: John Alhroos Date: Mon, 24 May 2010 09:57:29 +0000 (+0000) Subject: Fixes with the issue with the DateField growing when toggling read-only state. Relate... X-Git-Tag: 6.7.0.beta1~1653^2~8 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=44f01a68fd4ffbacce5b8eb70eea1eb08aa98ccd;p=vaadin-framework.git Fixes with the issue with the DateField growing when toggling read-only state. Related to #4582 fix. svn changeset:13316/svn branch:6.3 --- diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java index 541b6e92d0..8d5c21c512 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java @@ -67,16 +67,17 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field, calendarToggle.setTabIndex(uidl.getIntAttribute("tabindex")); } - if (lastReadOnlyState != readonly) { - updateWidth(); - } - - calendarToggle.setEnabled(true); if (readonly) { calendarToggle.addStyleName(CLASSNAME + "-button-readonly"); } else { calendarToggle.removeStyleName(CLASSNAME + "-button-readonly"); } + + if (lastReadOnlyState != readonly) { + updateWidth(); + } + + calendarToggle.setEnabled(true); } @Override