]> source.dussan.org Git - vaadin-framework.git/commitdiff
fixes #6874
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 21 Apr 2011 16:55:02 +0000 (16:55 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Thu, 21 Apr 2011 16:55:02 +0000 (16:55 +0000)
svn changeset:18436/svn branch:6.6

src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java

index 623bd1bf1b96673f4b19292ef9d05d430b1c0e86..64c2ecabd523b641a90808ea6cda3028d808a444 100644 (file)
@@ -22,6 +22,7 @@ import com.google.gwt.user.client.ui.Button;
 import com.google.gwt.user.client.ui.PopupPanel;\r
 import com.google.gwt.user.client.ui.PopupPanel.PositionCallback;\r
 import com.vaadin.terminal.gwt.client.ApplicationConnection;\r
+import com.vaadin.terminal.gwt.client.BrowserInfo;\r
 import com.vaadin.terminal.gwt.client.DateTimeService;\r
 import com.vaadin.terminal.gwt.client.Paintable;\r
 import com.vaadin.terminal.gwt.client.UIDL;\r
@@ -335,7 +336,13 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field,
     public void onClose(CloseEvent<PopupPanel> event) {\r
         if (event.getSource() == popup) {\r
             buildDate();\r
-            focus();\r
+            if (!BrowserInfo.get().isTouchDevice()) {\r
+                /*\r
+                 * Move focus to textbox, unless on touch device (avoids opening\r
+                 * virtual keyboard).\r
+                 */\r
+                focus();\r
+            }\r
 \r
             // TODO resolve what the "Sigh." is all about and document it here\r
             // Sigh.\r