I have a very bad problem with JQuery Autocomplete and the Internet Explorer.
First I have a input field with a special char value like:
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags" value="Häskell">
</div>
Then my JQuery UI Autocomplete Code looks like
$(function() {
var availableTags = [
"ActionScript",
"AppleScript",
"Asp",
"BASIC",
"C",
"C++",
"Clojure",
"COBOL",
"ColdFusion",
"Erlang",
"Fortran",
"Groovy",
"Häskell",
"Java",
"JavaScript",
"Lisp",
"Perl",
"PHP",
"Python",
"Ruby",
"Scala",
"Scheme"
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
Now when i visit the site with the Internet Explorer, the autocomplete automatically fire and show me the entry "Häskell". (You also can press F5 to reproduce the bug) But that only happens when the input field value has a special char like ä, ö, ...
I also found a Bug Ticket http://bugs.jqueryui.com/ticket/9796#no1
Can somebody help me please?
Big thanks!
To prevent such event you should a bit modify jquery ui (it is real bug of IE and partially jquery). Problem is in next feature. IE rises event "input" where another browers does not rise it. before modifying this function has next view:
input:function(e) {
if (r) {
r =! 1, e.preventDefault();
return;
}
this._searchTimeout(e)
}
input:function(e) {
if (r || typeof(r) == "undefined") {
r =! 1, e.preventDefault();
return;
}
this._searchTimeout(e)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With