aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdramaix <julien.dramaix@gmail.com>2013-01-23 01:50:03 +0100
committerjdramaix <julien.dramaix@gmail.com>2013-01-23 01:50:03 +0100
commit00eae0430276e873ebb1ba083a984e84b0e821a1 (patch)
tree249b9b6d4d8e9847977d77ab4e86ced143ab6b9f
parent723156e45fc855d5d993e1ea58cdab1cf2aafd0b (diff)
downloadgwtquery-00eae0430276e873ebb1ba083a984e84b0e821a1.tar.gz
gwtquery-00eae0430276e873ebb1ba083a984e84b0e821a1.zip
fix issue #12
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
index 6ba03bae..1f239fdc 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/events/EventsListener.java
@@ -16,6 +16,7 @@ package com.google.gwt.query.client.plugins.events;
import static com.google.gwt.query.client.GQuery.$;
import com.google.gwt.core.client.Duration;
+import com.google.gwt.core.client.JsArrayString;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.EventTarget;
import com.google.gwt.dom.client.NodeList;
@@ -531,12 +532,18 @@ public class EventsListener implements EventListener {
for (String k : liveBindFunctionByEventType.keys()) {
LiveBindFunction liveBindFunction = liveBindFunctionByEventType.<JsCache> cast().get(k);
liveBindFunction.removeBindFunctionForSelector(cssSelector, nameSpace, null);
+ if (liveBindFunction.isEmpty()){
+ liveBindFunctionByEventType.<JsCache>cast().delete(k);
+ }
}
} else {
LiveBindFunction liveBindFunction = liveBindFunctionByEventType.get(eventbits);
if (liveBindFunction != null) {
liveBindFunction.removeBindFunctionForSelector(cssSelector, nameSpace, originalEventName);
}
+ if (liveBindFunction.isEmpty()){
+ liveBindFunctionByEventType.remove(eventbits);
+ }
}
}