AutoComplete works fine with a textarea in Chrome, but in IE8 it fails when it gets to this line in the AutoComplete init():
element[0].type = "text";
I added a try/catch block around that line, and that makes it work just fine in IE8.
3 Answers, 1 is accepted
0
Dimo
Telerik team
answered on 24 Apr 2012, 09:47 AM
Hello Edwin,
The AutoComplete has been designed to work with an <input> element. Bear in mind that even if you workaround the Javascript error during initialization, you will get another one if you insert a new line and continue typing. The second error is related to the Kendo datasource filtering mechanism and avoiding it will require adding unnecessary complexity to the code, so we will refrain from officially supporting this scenario unless more people request it.
Greetings,
Dimo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
I would also like to use auto-complete with textarea. I came up with a similar workaround (if (element[0].type != "textarea") {) but did not think to try hitting the ENTER key until I read this post. It does indeed crash the control.
The following change to the "search" function in kendo.autocomplete.js seems to keep it from crashing on the newline, but the newline is lost if a selection is made.
if (separator) {
word = wordAtCaret(caretPosition(that.element[0]), word, separator);