Problems with CJuiAutoComplete

Hi all,

I’ve been working in Yii for the last couple of months, and I stumbled onto the following problem.

The project that I’m working on (Yii version 1.1.3) has several implementations of CJuiAutoComplete.

The autocomplete works great in firefox, but not in IE, or chrome. When you click on the autocomplete options to fast, it closes the auto complete without setting the value.

It is not possible to upgrade Yii to a different version, nor is it possible to upgrade the jquery of CJuiAutoComplete (have tried both, and failed…)

What can I do, has anyone else encountered this problem? and what is the solution or fix for this?

code:




Yii::app()->controller->createWidget("zii.widgets.jui.CJuiAutoComplete",array(

            "model"=>$model,

            "attribute"=>"type",

            "sourceUrl"=>Yii::app()->controller->createUrl("/Core/service/ajax&FORMAT=text",array("SID"=>"module.service.action","action_id"=>$this->get('action_id'))),

            "htmlOptions"=>array_merge($hasReadonly, array("id"=>"Action_type", 'size' => 60, 'maxlength'=>255))

            ))->run();



(code was slightly altered to hide private data)

Thx to anyone for help/advice

Darghon

AM doing thesame thing right now and i need to READONLY within the CJuiAutoComplete htmlOptions… Can anybody help?

Hi,

same problem here.

I have found, that IE (7,8,9) would not fire the "change" event.

I will work fine if you select item with the mouse.

But selecting the item with arrow keys UP/DOWN + ENTER would not trigger "change" event in IE.

Here is version working in IE, but causing to trigger double "change" event (two HTTP requests) in other correctly working browsers:




$controller->widget('zii.widgets.jui.CJuiAutoComplete', array(

	'name'=>'CITY',

	'source'=>'js:getCity()',

	'options'=>array(

		'minLength'=>'3',

		'select'=>'js: function (event, ui){

			$(this).trigger("change");

		}',

	),

	'htmlOptions'=>array(

		'maxlength'=>'20',

		'class'=>'field',

	),

));



I still dont know how to fix this to trigger only one single event in all browsers…