maxschuster / Vaadin-AutocompleteTextField

A Vaadin TextField with autocomplete (aka word completion) functionality
https://vaadin.maxschuster.eu/AutocompleteTextField/
Apache License 2.0
9 stars 6 forks source link

call on onUnregister produces `this.removeEvent is not a function` exception #26

Open aschemschat opened 6 years ago

aschemschat commented 6 years ago

Hi,

I tried using the AutoCompleteTextfield in a TabSheet and upon switching the tabs got the following javascript-Error:

SEVERE: (TypeError) : this.removeEvent is not a function com.google.gwt.core.client.JavaScriptException: (TypeError) : this.removeEvent is not a function at Unknown.onUnregister(http://localhost:8080/VAADIN/addons/autocompletetextfield/dist/AutocompleteTextFieldExtension.min.js) at Unknown.Sxb(com.vaadin.DefaultWidgetSet-0.js) ......

In the AutocompleteTextfieldExtension.js i found one removeEvent-call in line 221 but no defined function removeEvent. The same event is removed with window.removeEventListener("scroll", this.onScroll, true); at another code-line. I cloned the project and tried building it, unfortunately my build fails because of some grunt-dependency-errors for which i currently don't habe the time, so i couldn't test just replacing the missing function with the other window.removeEvent-call.

And on a final note: thanks for the plugin, very useful and quite nicely done :)