summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2009-09-15 07:57:37 +0000
committerArtur Signell <artur.signell@itmill.com>2009-09-15 07:57:37 +0000
commitade91f47d8564940ac6001873a99415d0830a53b (patch)
tree52224cc94927aafad6c87d2d35a56b461300cef6 /src
parent10fbfac43675764c96ece75e4f48a53c2ef962b7 (diff)
downloadvaadin-framework-ade91f47d8564940ac6001873a99415d0830a53b.tar.gz
vaadin-framework-ade91f47d8564940ac6001873a99415d0830a53b.zip
Test case and fix for #3343 - IE6 doesn't display cursor when tabbing into a TextField with an input prompt
svn changeset:8787/svn branch:6.1
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VTextField.java8
-rw-r--r--src/com/vaadin/tests/components/textfield/IE6Cursor.java27
2 files changed, 33 insertions, 2 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java
index cd3d9f347c..4403aede35 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VTextField.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VTextField.java
@@ -23,9 +23,9 @@ import com.vaadin.terminal.gwt.client.VTooltip;
/**
* This class represents a basic text input field with one row.
- *
+ *
* @author IT Mill Ltd.
- *
+ *
*/
public class VTextField extends TextBoxBase implements Paintable, Field,
ChangeHandler, FocusHandler, BlurHandler {
@@ -167,6 +167,10 @@ public class VTextField extends TextBoxBase implements Paintable, Field,
if (prompting) {
setText("");
removeStyleDependentName(CLASSNAME_PROMPT);
+ if (BrowserInfo.get().isIE6()) {
+ // IE6 does not show the cursor when tabbing into the field
+ setCursorPos(0);
+ }
}
focusedTextField = this;
}
diff --git a/src/com/vaadin/tests/components/textfield/IE6Cursor.java b/src/com/vaadin/tests/components/textfield/IE6Cursor.java
new file mode 100644
index 0000000000..aee56dd7ee
--- /dev/null
+++ b/src/com/vaadin/tests/components/textfield/IE6Cursor.java
@@ -0,0 +1,27 @@
+package com.vaadin.tests.components.textfield;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.TextField;
+
+public class IE6Cursor extends TestBase {
+
+ @Override
+ protected void setup() {
+ TextField tf1 = new TextField("First");
+ TextField tf2 = new TextField("Second");
+ tf2.setInputPrompt("prompt");
+
+ addComponent(tf1);
+ addComponent(tf2);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Tabbing from the first field to the second should clear the second textfield and show the normal, blinking cursor in the field";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 3343;
+ }
+
+}