diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java index bd5e9be1..02db7146 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/Function.java @@ -89,7 +89,7 @@ public Function setElement(T e) { public Function setEvent(Event e) { event = e; element = - e != null ? e.getCurrentEventTarget(). cast() : null; + e != null ? e.getCurrentEventTarget(). cast() : null; return this; } @@ -240,13 +240,13 @@ public T getArgument(int argIdx, int pos, Class type) { Object[] objs = getArgumentArray(argIdx); Object o = objs.length > pos ? objs[pos] : null; if (o != null && ( - // When type is null we don't safety check - type == null || - // The object is an instance of the type requested - o.getClass() == type || - // Overlay types - type == JavaScriptObject.class && o instanceof JavaScriptObject - )) { + // When type is null we don't safety check + type == null || + // The object is an instance of the type requested + o.getClass() == type || + // Overlay types + type == JavaScriptObject.class && o instanceof JavaScriptObject + )) { return (T) o; } return null; @@ -337,7 +337,7 @@ public void cancel(com.google.gwt.user.client.Element e) { */ public void f() { throw new RuntimeException("You have to override the adequate method to handle " + - "this action, or you have to override 'public void f()' to avoid this error"); + "this action, or you have to override 'public void f()' to avoid this error"); } /** @@ -424,6 +424,20 @@ public void f(int i, Object... args) { } } + /** + * Does this fix the issue with gwt???????????????????? + * + * Override this method for bound event handlers if you wish to deal with + * per-handler user data. + * + * @return boolean false means stop propagation and prevent default + */ + public boolean f(Event e, Object arg) { + setArguments(arg); + setEvent(e); + return f(e); + } + /** * Override this method for bound event handlers if you wish to deal with * per-handler user data. diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java index 59757bb6..650dd1af 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/GqEvent.java @@ -50,7 +50,7 @@ public static GqEvent create(Event originalEvent) { } private static native void copy( - Event originalEvent, GqEvent gQueryEvent) /*-{ + Event originalEvent, GqEvent gQueryEvent) /*-{ for ( var field in originalEvent) { gQueryEvent[field] = originalEvent[field]; } @@ -69,11 +69,6 @@ public final native Event getOriginalEvent() /*-{ public final native void setCurrentElementTarget(Element e) /*-{ this.currentTarget = e; - - // ie don't have a currentEventTarget field on event - try{ - @com.google.gwt.dom.client.DOMImplTrident::currentEventTarget = e; - }catch(e){} }-*/; /**