没想到啊

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

在FF下,切换到中文输入法,再输入中文,是不能立即自动查询,需要按下其他按键,比如CTRL,后来,通过修改源代码即可修复这个问题。

找到以下代码:

.bind( "blur.autocomplete", function( event ) {
                if ( self.options.disabled ) {
                    return;
                }

                clearTimeout( self.searching );
                // clicks on the menu (or a button to trigger a search) will cause a blur event
                self.closing = setTimeout(function() {
                    self.close( event );
                    self._change( event );
                }, 150 );
            });

替换成:

.bind( "blur.autocomplete", function( event ) {
                if ( self.options.disabled ) {
                    return;
                }

                clearTimeout( self.searching );
                // clicks on the menu (or a button to trigger a search) will cause a blur event
                self.closing = setTimeout(function() {
                    self.close( event );
                    self._change( event );
                }, 150 );
            }).bind('input',function (c) {//jQuery UI Autocomplete 1.8.*中文输入修正
                self.search(self.item);
            });

 

经过经验,在1.8.16-1.8.23(目前最新版本),均可实现。

posted on 2012-09-19 10:13  没想到啊  阅读(2023)  评论(0编辑  收藏  举报