diff options
author | Matti Tahvonen <matti.tahvonen@itmill.com> | 2011-01-25 09:58:24 +0000 |
---|---|---|
committer | Matti Tahvonen <matti.tahvonen@itmill.com> | 2011-01-25 09:58:24 +0000 |
commit | dcf2b76f3e138cb14171dcd16af7565eb18f714f (patch) | |
tree | 665b71887c0a3d886f1ac17400f62a8309b3ce86 /src/com/vaadin/terminal | |
parent | 28dca26fc5198a67cab5e58ae3d3078c10704b18 (diff) | |
download | vaadin-framework-dcf2b76f3e138cb14171dcd16af7565eb18f714f.tar.gz vaadin-framework-dcf2b76f3e138cb14171dcd16af7565eb18f714f.zip |
fixes #6316, reviewed by artur
svn changeset:17008/svn branch:6.5
Diffstat (limited to 'src/com/vaadin/terminal')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VTextField.java | 3 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VView.java | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java index 334f2617a5..49d18f0867 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java @@ -326,6 +326,9 @@ public class VTextField extends TextBoxBase implements Paintable, Field, protected void onDetach() { super.onDetach(); detachCutEventListener(getElement()); + if (focusedTextField == this) { + focusedTextField = null; + } } @Override diff --git a/src/com/vaadin/terminal/gwt/client/ui/VView.java b/src/com/vaadin/terminal/gwt/client/ui/VView.java index 2d47790dab..ea43deba9d 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VView.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VView.java @@ -505,6 +505,10 @@ public class VView extends SimplePanel implements Container, ResizeHandler, public void onWindowClosing(Window.ClosingEvent event) { // Change focus on this window in order to ensure that all state is // collected from textfields + // TODO this is a naive hack, that only works with text fields and may + // cause some odd issues. Should be replaced with a decent solution, see + // also related BeforeShortcutActionListener interface. Same interface + // might be usable here. VTextField.flushChangesFromFocusedTextField(); // Send the closing state to server |