From 41f502ff6ba15dacb9066909a9984763d2489c41 Mon Sep 17 00:00:00 2001 From: Matt Williamson Date: Wed, 15 Mar 2023 12:53:56 -0400 Subject: [PATCH] Apply Robert Molenda's GWT 2.10 fix. - from https://github.com/ArcBees/gwtquery/issues/389#issuecomment-1385659047 --- README.md | 5 ++++- .../java/com/google/gwt/query/client/Function.java | 14 ++++++++++++++ .../gwt/query/client/plugins/events/GqEvent.java | 5 ----- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 03eae192..e889a053 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ Jorsek/gwtquery ======== -A fork of Arcbees/gwtquery to fix GWT 2.10 dependencies. +A fork of [Arcbees/gwtquery](https://github.com/ArcBees/gwtquery) to fix GWT 2.10 dependencies. * master branch reset to last release '1.5-beta', 8 remaining commits preserved in branch 'master-from-fork' +* applied [Robert Molenda](https://github.com/RobertMolenda)'s GWT 2.10.0 [fix](https://github.com/ArcBees/gwtquery/issues/389#issuecomment-1385659047). + +Thanks to Robert and Arcbees for their contributions! \ No newline at end of file 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..f0497ff9 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 @@ -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..4ffe9632 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 @@ -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){} }-*/; /**