From: Manuel Carrasco MoƱino Date: Mon, 10 Dec 2012 08:59:36 +0000 (+0100) Subject: dont set tabIndex to window. Fixes issue 157 X-Git-Tag: release-1.3.2~30 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=07263983873c3885b93238d6168aaaa74461c2e8;p=gwtquery.git dont set tabIndex to window. Fixes issue 157 --- 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"); }