From 07263983873c3885b93238d6168aaaa74461c2e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Manuel=20Carrasco=20Mo=C3=B1ino?= Date: Mon, 10 Dec 2012 09:59:36 +0100 Subject: [PATCH] dont set tabIndex to window. Fixes issue 157 --- .../gwt/query/client/plugins/events/EventsListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java index 886df5b9..38366b60 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java @@ -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"); } -- 2.39.5