Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch aus https://github.com/ArcBees/gwtquery/issues/389 integriert #391

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public <T extends com.google.gwt.dom.client.Element> Function setElement(T e) {
public Function setEvent(Event e) {
event = e;
element =
e != null ? e.getCurrentEventTarget().<com.google.gwt.dom.client.Element> cast() : null;
e != null ? e.getCurrentEventTarget().<com.google.gwt.dom.client.Element> cast() : null;
return this;
}

Expand Down Expand Up @@ -240,13 +240,13 @@ public <T> T getArgument(int argIdx, int pos, Class<? extends T> 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;
Expand Down Expand Up @@ -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");
}

/**
Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand All @@ -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){}
}-*/;

/**
Expand Down