From 44f01a68fd4ffbacce5b8eb70eea1eb08aa98ccd Mon Sep 17 00:00:00 2001 From: John Alhroos Date: Mon, 24 May 2010 09:57:29 +0000 Subject: [PATCH] Fixes with the issue with the DateField growing when toggling read-only state. Related to #4582 fix. svn changeset:13316/svn branch:6.3 --- .../vaadin/terminal/gwt/client/ui/VPopupCalendar.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -- 2.39.5