]> source.dussan.org Git - vaadin-framework.git/commitdiff
tuning tabIndex behavior
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 26 Sep 2008 06:45:05 +0000 (06:45 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Fri, 26 Sep 2008 06:45:05 +0000 (06:45 +0000)
svn changeset:5519/svn branch:trunk

src/com/itmill/toolkit/terminal/gwt/client/ui/IView.java
src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java

index 3611e6e0d5710bb1c966e32d26f5e41a78679ffb..3255f8223cbdb3c279c6585c5773c19679927e54 100644 (file)
@@ -63,7 +63,9 @@ public class IView extends SimplePanel implements Paintable,
 
         DOM.sinkEvents(getElement(), Event.ONKEYDOWN);
 
-        DOM.setElementProperty(getElement(), "tabIndex", "0");
+        // iview is focused when created so element needs tabIndex
+        // 1 due 0 is at the end of natural tabbing order
+        DOM.setElementProperty(getElement(), "tabIndex", "1");
 
         RootPanel.get(elementId).add(this);
 
@@ -326,8 +328,8 @@ public class IView extends SimplePanel implements Paintable,
     }
 
     private static native void focusElement(Element e) /*-{ 
-                                        e.focus();
-                                        }-*/;
+                                                    e.focus();
+                                                    }-*/;
 
     public String onWindowClosing() {
         return null;
index 30fd38ca734e0d153a0f92a3a08b9661b0c57afb..13b6d7988db821645e2692c0bddfeae946368534 100644 (file)
@@ -842,7 +842,7 @@ public class ApplicationServlet extends HttpServlet {
             // there are multiple toolkit portlets visible at the same time.
             // TODO remove this when hosted mode on linux gets newer gecko
 
-            page.write("<iframe id=\"__gwt_historyFrame\" "
+            page.write("<iframe tabIndex=\"-1\" id=\"__gwt_historyFrame\" "
                     + "style=\"width:0;height:0;border:0;overflow:"
                     + "hidden\" src=\"javascript:false\"></iframe>\n");
             page.write("<script language='javascript' src='" + staticFilePath
@@ -895,9 +895,10 @@ public class ApplicationServlet extends HttpServlet {
                     + "if(!itmill) { var itmill = {}} \n"
                     + "itmill.toolkitConfigurations = {};\n"
                     + "itmill.themesLoaded = {};\n");
-            page.write("document.write('<iframe id=\"__gwt_historyFrame\" "
-                    + "style=\"width:0;height:0;border:0;overflow:"
-                    + "hidden\" src=\"javascript:false\"></iframe>');\n");
+            page
+                    .write("document.write('<iframe tabIndex=\"-1\" id=\"__gwt_historyFrame\" "
+                            + "style=\"width:0;height:0;border:0;overflow:"
+                            + "hidden\" src=\"javascript:false\"></iframe>');\n");
             page.write("document.write(\"<script language='javascript' src='"
                     + staticFilePath + "/" + WIDGETSET_DIRECTORY_PATH
                     + widgetset + "/" + widgetset