作成日: 2020/03/03 最終更新日: 2020/05/15
文書種別
不具合
発生環境
IE11
状況
修正済み
詳細
IE11でセルに数式を入力中に、数式の計算対象となるセル範囲を選択するためにカーソルキーを押下すると、数式の入力がキャンセルされます。
【再現手順】
1. 任意のセルに「=sum(」と入力します。
2. カーソルキーを押下します。
【動作結果】
IE11ではセルの入力がキャンセルされます。
【再現手順】
1. 任意のセルに「=sum(」と入力します。
2. カーソルキーを押下します。
【動作結果】
IE11ではセルの入力がキャンセルされます。
回避方法
SpreadJS (Ver.13.1.1)で修正済み
Ver.13.1.1より前のバージョンでは次の方法で回避可能です。
以下のJavaScriptで回避可能です。
◎サンプルコード(JavaScript)
Ver.13.1.1より前のバージョンでは次の方法で回避可能です。
以下のJavaScriptで回避可能です。
◎サンプルコード(JavaScript)
window.onload = function() {
var agent = window.navigator.userAgent.toLowerCase();
var ie11 = (agent.indexOf('trident/7') !== -1);
if (ie11) {
// rename the built-in FormulaTextBox.prototype.text function
GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.oldTextFunc = GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.text;
// rewrite the FormulaTextBox.prototype.text function when js loaded.
GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.text = function(value) {
if (value !== void 0) { // call the old function when it's set text
return this.oldTextFunc(value);
}
var colorContentDiv = document.getElementsByClassName("gcsj-func-color-content")[0]; // find the "gcsj-func-color-content" span
if (colorContentDiv) {
return colorContentDiv.parentNode.innerText; // get the full text content and return.
}
return this.oldTextFunc();
}
}
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
}
var agent = window.navigator.userAgent.toLowerCase();
var ie11 = (agent.indexOf('trident/7') !== -1);
if (ie11) {
// rename the built-in FormulaTextBox.prototype.text function
GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.oldTextFunc = GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.text;
// rewrite the FormulaTextBox.prototype.text function when js loaded.
GC.Spread.Sheets.FormulaTextBox.FormulaTextBox.prototype.text = function(value) {
if (value !== void 0) { // call the old function when it's set text
return this.oldTextFunc(value);
}
var colorContentDiv = document.getElementsByClassName("gcsj-func-color-content")[0]; // find the "gcsj-func-color-content" span
if (colorContentDiv) {
return colorContentDiv.parentNode.innerText; // get the full text content and return.
}
return this.oldTextFunc();
}
}
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
}
旧文書番号
84972