From: Artur Signell Date: Tue, 15 Sep 2009 07:57:37 +0000 (+0000) Subject: Test case and fix for #3343 - IE6 doesn't display cursor when tabbing into a TextFiel... X-Git-Tag: 6.7.0.beta1~2480^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ade91f47d8564940ac6001873a99415d0830a53b;p=vaadin-framework.git 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 --- 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; + } + +}