Skip to content

Commit

Permalink
Patch aus ArcBees#389 integriert
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelJustin-VEDA committed Jun 12, 2024
1 parent d616050 commit b610d51
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 15 deletions.
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

0 comments on commit b610d51

Please sign in to comment.