diff options
author | Julien Dramaix <julien.dramaix@gmail.com> | 2013-11-29 03:19:22 -0800 |
---|---|---|
committer | Julien Dramaix <julien.dramaix@gmail.com> | 2013-11-29 03:19:22 -0800 |
commit | 9df2f18c2b655db88abc31787ae7903f01f71060 (patch) | |
tree | 38432694e864a73782197acd41bbf59b0464c3aa | |
parent | eeedaf2392458bbfbd4413e99dba42bcafe3710f (diff) | |
parent | 2c8e10ae8f56a8d01e09d294c41093e90cc55ec5 (diff) | |
download | gwtquery-9df2f18c2b655db88abc31787ae7903f01f71060.tar.gz gwtquery-9df2f18c2b655db88abc31787ae7903f01f71060.zip |
Merge pull request #239 from gwtquery/jd_custom_event_fix_ie8
fix ie8 custom event
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java index 94d1ab8d..5d09fea8 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/Events.java @@ -377,7 +377,14 @@ public class Events extends GQuery { for (Element e : elements()) { if (isEventCapable(e)) { $(e).data(EventsListener.EVENT_DATA, datas); - e.dispatchEvent(evt); + + // Ie6-8 don't dispatch bitless event + if ((browser.ie6 || browser.ie8) && Event.getTypeInt(evt.getType()) == -1) { + EventsListener.getInstance(e).dispatchEvent(evt.<Event>cast()); + } else { + e.dispatchEvent(evt); + } + if (!JsUtils.isDefaultPrevented(evt)) { callHandlers(e, evt, funcs); } @@ -392,5 +399,4 @@ public class Events extends GQuery { f.f(e); } } - } |