diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/com/vaadin/client/ui/VCalendarPanel.java | 8 | ||||
-rw-r--r-- | client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/client/src/com/vaadin/client/ui/VCalendarPanel.java b/client/src/com/vaadin/client/ui/VCalendarPanel.java index 84151ca67e..74462e501d 100644 --- a/client/src/com/vaadin/client/ui/VCalendarPanel.java +++ b/client/src/com/vaadin/client/ui/VCalendarPanel.java @@ -1090,12 +1090,18 @@ public class VCalendarPanel extends FocusableFlexTable implements * The keydown/keypress event */ private void handleKeyPress(DomEvent<?> event) { + // Special handling for events from time ListBoxes. if (time != null && time.getElement().isOrHasChild( (Node) event.getNativeEvent().getEventTarget().cast())) { int nativeKeyCode = event.getNativeEvent().getKeyCode(); if (nativeKeyCode == getSelectKey()) { - onSubmit(); // submit happens if enter key hit down on listboxes + onSubmit(); // submit if enter key hit down on listboxes + event.preventDefault(); + event.stopPropagation(); + } + if (nativeKeyCode == getCloseKey()) { + onCancel(); // cancel if ESC key hit down on listboxes event.preventDefault(); event.stopPropagation(); } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index 2206aebaca..fbf94f0da3 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -262,6 +262,10 @@ public abstract class AbstractOrderedLayoutConnector extends } boolean enabled = child.isEnabled(); + if (slot.hasCaption() && null == caption) { + slot.setCaptionResizeListener(null); + } + slot.setCaption(caption, icon, styles, error, showError, required, enabled); |