]> source.dussan.org Git - gwtquery.git/commitdiff
dont set tabIndex to window. Fixes issue 157
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Mon, 10 Dec 2012 08:59:36 +0000 (09:59 +0100)
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>
Mon, 10 Dec 2012 08:59:36 +0000 (09:59 +0100)
gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java

index 886df5b9855c12a6f1a80b410e7dffcdd52eabdb..38366b60f7f08f79f7d9d70137e613c490bf75f6 100644 (file)
@@ -25,6 +25,7 @@ import com.google.gwt.query.client.js.JsCache;
 import com.google.gwt.query.client.js.JsMap;
 import com.google.gwt.query.client.js.JsNamedArray;
 import com.google.gwt.query.client.js.JsObjectArray;
+import com.google.gwt.query.client.js.JsUtils;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Event;
 import com.google.gwt.user.client.EventListener;
@@ -636,7 +637,8 @@ public class EventsListener implements EventListener {
     } else if ((eventBits | ONRESIZE) == ONRESIZE) {
       sinkEvent(element, "resize");
     } else {
-      if ((eventBits | Event.FOCUSEVENTS) == Event.FOCUSEVENTS
+      if ((eventBits | Event.FOCUSEVENTS) == Event.FOCUSEVENTS 
+          && JsUtils.isElement(element)
           && element.getAttribute("tabIndex").length() == 0) {
         element.setAttribute("tabIndex", "0");
       }