EasyUI Forum
September 14, 2025, 01:13:03 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: how to make the autocomplete of combox response for chinese words comfortably  (Read 6822 times)
Jeffrey AnnSheila
Newbie
*
Posts: 21


View Profile Email
« on: May 20, 2016, 02:45:00 AM »

hi, i find the autocomplete of combox works fine for english inputting, but when i enter a chinese word , it doesn't show the suggest list until i click the "Ctrl" ,"Command“or "Shift" again. that is a trifle disappointing. i need help to improve it.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: May 21, 2016, 03:08:11 AM »

Please try to add this code to your page.
Code:
<script type="text/javascript">
(function($){
function inputEventHandler(e){
var target = e.data.target;
var t = $(target);
var state = t.data('combo');
var opts = t.combo('options');
if (opts.editable){
if (state.timer){
clearTimeout(state.timer);
}
state.timer = setTimeout(function(){
var q = t.combo('getText');
if (state.previousText != q){
state.previousText = q;
t.combo('showPanel');
opts.keyHandler.query.call(target, q, e);
t.combo('validate');
}
}, opts.delay);
}
}
$.extend($.fn.combo.defaults.inputEvents, {
input: inputEventHandler
});
})(jQuery);
</script>
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!