ArcBees / gwtquery

A jQuery clone for GWT, and much more.
MIT License
85 stars 38 forks source link

Call undelegate() will throw exception if it is not delegated before. #226

Closed July-G closed 10 years ago

July-G commented 10 years ago

For example, call $('ul').undelegate("li", "click") will throw NPE if we did not call delegate("li","click", myFunc) before it, while in native jquery there is no exception.

java.lang.NullPointerException: null
    at com.google.gwt.query.client.plugins.events.EventsListener.die(EventsListener.java:543)
    at com.google.gwt.query.client.plugins.events.EventsListener.die(EventsListener.java:523)
    at com.google.gwt.query.client.plugins.Events.die(Events.java:127)
    at com.google.gwt.query.client.GQuery.die(GQuery.java:2014)
    at com.google.gwt.query.client.GQuery.undelegate(GQuery.java:4459)

I'm using 1.4.0-Snapshot. Thanks.

jDramaix commented 10 years ago

Thanks for reporting

jDramaix commented 10 years ago

Could you test with the last snapshot ?

jDramaix commented 10 years ago

Test added. I will close this issue.

@July-G If you have still the problem, please reopen this issue

Thanks for reporting

July-G commented 10 years ago

@jDramaix Thanks for fixing this.