AutoPostBackプロパティをTrueに設定しても、コンボコントロールの項目選択時にポストバックが発生しない場合がある
対象製品
InputMan for ASP.NET 8.0J
発生環境
Internet Explorer 9/10/11, Chrome
状況
修正済み
詳細
コンボコントロールのAutoPostBackプロパティをTrueに設定し、DropDownStyleプロパティをDropDownListに設定しても、マウスでの項目を選択したときは、ポストバックされません。
なお、キーボードで項目を選択した場合は正常に動作します。
なお、キーボードで項目を選択した場合は正常に動作します。
回避方法
この問題はService Pack 1(v8.0.2015.929)で修正されました。
不具合を修正した最新のサービスパックは、アップデートページからダウンロードできます。
Service Pack 1より前のバージョンでは次の方法で回避可能です。
以下の回避スクリプトをaspxファイルに追加します。
[Javascript]
<script type="text/javascript">
window.onload = function () {
GCIM.GcComboBox.prototype._selectItem = function (idx) {
if (!this.GetEnabled() && !this._isMethodCall)
return false;
if (this.GetReadOnly() && !this._isMethodCall) {
if (this._droppedDown)
this.CloseDropDown();
return false;
}
this._validatedSelectedItem(idx);
this._dropDownBtnPressed = false;
if (this.GetDropDownStyle() !== GCIM.DropDownStyle.Simple)
if (!this._droppedDown)
this._mouseIsOnDropDownList = false;
if (this.GetDropDownStyle() === GCIM.DropDownStyle.DropDownList && this._getAutoPostBack()) {
if (this._mouseIsOnSpinDown === true)
this._mouseIsOnSpinDown = false;
if (this._mouseIsOnSpinUp === true)
this._mouseIsOnSpinUp = false;
if (this._mouseIsOnDropDownList === true)
this._mouseIsOnDropDownList = false;
if (!this._initingServerData)
this.LoseFocus();
}
};
}
</script>
不具合を修正した最新のサービスパックは、アップデートページからダウンロードできます。
Service Pack 1より前のバージョンでは次の方法で回避可能です。
以下の回避スクリプトをaspxファイルに追加します。
[Javascript]
<script type="text/javascript">
window.onload = function () {
GCIM.GcComboBox.prototype._selectItem = function (idx) {
if (!this.GetEnabled() && !this._isMethodCall)
return false;
if (this.GetReadOnly() && !this._isMethodCall) {
if (this._droppedDown)
this.CloseDropDown();
return false;
}
this._validatedSelectedItem(idx);
this._dropDownBtnPressed = false;
if (this.GetDropDownStyle() !== GCIM.DropDownStyle.Simple)
if (!this._droppedDown)
this._mouseIsOnDropDownList = false;
if (this.GetDropDownStyle() === GCIM.DropDownStyle.DropDownList && this._getAutoPostBack()) {
if (this._mouseIsOnSpinDown === true)
this._mouseIsOnSpinDown = false;
if (this._mouseIsOnSpinUp === true)
this._mouseIsOnSpinUp = false;
if (this._mouseIsOnDropDownList === true)
this._mouseIsOnDropDownList = false;
if (!this._initingServerData)
this.LoseFocus();
}
};
}
</script>