summaryrefslogtreecommitdiffstats
path: root/src/com/itmill/toolkit/ui/AbstractField.java
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2008-09-30 11:13:49 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2008-09-30 11:13:49 +0000
commit662b4725dfce0fad89645c3a0896315841f1988a (patch)
tree79524b65ff8a66bdd5e61995fbc66f09586a7940 /src/com/itmill/toolkit/ui/AbstractField.java
parent42d2e4de5c76cf6a6696904e0adf99ff4dacef50 (diff)
downloadvaadin-framework-662b4725dfce0fad89645c3a0896315841f1988a.tar.gz
vaadin-framework-662b4725dfce0fad89645c3a0896315841f1988a.zip
svn changeset:5558/svn branch:trunk
Diffstat (limited to 'src/com/itmill/toolkit/ui/AbstractField.java')
-rw-r--r--src/com/itmill/toolkit/ui/AbstractField.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/com/itmill/toolkit/ui/AbstractField.java b/src/com/itmill/toolkit/ui/AbstractField.java
index 285d1a3dfe..fa1faecd0b 100644
--- a/src/com/itmill/toolkit/ui/AbstractField.java
+++ b/src/com/itmill/toolkit/ui/AbstractField.java
@@ -925,13 +925,16 @@ public abstract class AbstractField extends AbstractComponent implements Field,
}
- /**
- * Asks the terminal to place the cursor to this field.
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.itmill.toolkit.ui.Component.Focusable#focus()
*/
public void focus() {
final Application app = getApplication();
if (app != null) {
- app.setFocusedComponent(this);
+ getWindow().setFocusedComponent(this);
+ delayedFocus = false;
} else {
delayedFocus = true;
}
@@ -1013,8 +1016,6 @@ public abstract class AbstractField extends AbstractComponent implements Field,
public void attach() {
super.attach();
if (delayedFocus) {
-
- delayedFocus = false;
focus();
}
}