作成日: 2025/10/10 最終更新日: 2026/02/04
文書種別
不具合
発生環境
5.20251.34以降のバージョンで発生
状況
修正済み
詳細
AutoCompleteのisEditableプロパティをfalseに設定し、日本語入力(IMEがON)した場合にテキストボックスに入力中の文字が表示されません。
※「delay:0」や「minLength:1」を設定することで現象が顕著に表れますが、これらを設定しない場合でも入力中の状態で少し時間を置くと文字が消えます。
※「delay:0」や「minLength:1」を設定することで現象が顕著に表れますが、これらを設定しない場合でも入力中の状態で少し時間を置くと文字が消えます。
回避方法
この問題はバージョン5.20252.44で修正されました。
修正版を適用しない場合の回避方法は次の通りです。
【回避方法1】 どのバージョンでも有効
AutoCompleteクラスの_inputメソッド(内部メソッド)を以下のように上書きします。
wijmo.input.AutoComplete.prototype._input = function (e) {
if (this._draggingText) {
if (this.text === "") {
this._emptyValueAction = true
} else {
this._emptyValueAction = false
}
}
this._setText(this._textIsComposing != "" ? this._textIsComposing : this.text, false);
if (this.text != "") this._emptyValueAction = false;
this._draggingText = false;
}
【回避方法2】 5.20251.40以降で有効
下記のように2つの「回避方法」を記述します。
const autoComplete = new wijmo.input.AutoComplete('#autoComplete', {
displayMemberPath: 'name',
itemsSource: data,
minLength: 1,
isEditable: false, //自由入力を禁止にする
delay:0,
gotFocus: function (autoComplete) { // 回避方法
autoComplete._composing = false;
},
});
// 回避方法
autoComplete._handleComposingState = () => { };