1

yii tokeninput 拡張に問題があります。名前を検索するとユーザーリストが表示され、任意の名前を選択し、その名前が選択した項目の後のカーソルポイントよりも前に選択されている場合、入力ボックス内のすべての項目の最後を指していません。

この構成を使用しています。

$this->widget('ext.tokeninput.TokenInput', array(
       'model' => $model,
       'attribute' => 'USER_ID',
       'url'=>$this->createUrl('user/searchUserNames'),
       'options' => array(
           'allowCreation' => false,
           'preventDuplicates' => true,
          // 'resultsFormatter' => 'js:function(item){ return “&lt;li><p>” + item.name + “&lt;/p></li>” }',
           'theme' => 'facebook',
            //'hintText' => 'Type',
            'prePopulate' => $prePopulate,
            'processPrePopulate' => $processPrePopulate,

       )
   ));

例も見ていますが、解決策が見つかりません。誰でも私を助けることができますか? Loopj: jquery トークン入力のデモ

4

1 に答える 1

1
    plz comment the line number 509 in **jquery.tokeninput.js** 
    input_token.insertAfter(found_existing_token);
    that line insert cursor after that selected item so if you comment 
    this line cursor is at the end of all names
于 2012-07-11T13:36:15.307 に答える