From 197e7ce782968dfda2fd7849547ffdec59a387f5 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 3 Aug 2012 13:54:15 +0000 Subject: [PATCH] Do not submit TextArea value on enter in IE (#9139) svn changeset:24060/svn branch:6.8 --- src/com/vaadin/terminal/gwt/client/ui/VTextArea.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextArea.java b/src/com/vaadin/terminal/gwt/client/ui/VTextArea.java index c6107e3b0e..0ed5887442 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextArea.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextArea.java @@ -5,6 +5,7 @@ package com.vaadin.terminal.gwt.client.ui; import com.google.gwt.core.client.Scheduler; +import com.google.gwt.event.dom.client.KeyDownEvent; import com.google.gwt.user.client.Command; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.Element; @@ -76,4 +77,11 @@ public class VTextArea extends VTextField { // detected in a different way. return getImpl().getTextAreaCursorPos(getElement()); } + + @Override + public void onKeyDown(KeyDownEvent event) { + // Overridden to avoid submitting TextArea value on enter in IE. This is + // another reason why widgets should inherit a common abstract + // class instead of directly each other. + } } -- 2.39.5