【クライアント】[Tab]キーでSPREADにフォーカスが移動する際、スクロールしてSPREADが表示されない
対象製品
SPREAD for .NET 2.5J Web Forms Edition
発生環境
動作保証環境と同様
状況
修正済み
詳細
[Tab]キーで他のコントロールからSPREADにフォーカスが移動した際、ブラウザがスクロールしないため、SPREADが画面上に表示されない場合があります。
【手順】
1.新規WebフォームにTextBox、Label、SPREADを下記サンプルコードのように配置します
2.アプリケーションを実行します
3.TextBoxをクリックし、[Tab]キーを押下します
4.SPREADにフォーカスが移動しますが、ブラウザがスクロールされないため、画面上にSPREADが表示されません
【サンプルコード】
-------------------------
HTML
-------------------------
:
<略>
:
<asp:TextBox ID="TextBox1" runat="server" style="position: relative" TabIndex="1"></asp:TextBox<<br />
<asp:Label ID="Label1" runat="server" Text="Label" style="position: relative" Height="1024px"></asp:Label><br />
<FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid"
BorderWidth="1px" Height="200" Width="400" style="position: relative" TabIndex="2">
<Sheets>
:
<略>
:
【手順】
1.新規WebフォームにTextBox、Label、SPREADを下記サンプルコードのように配置します
2.アプリケーションを実行します
3.TextBoxをクリックし、[Tab]キーを押下します
4.SPREADにフォーカスが移動しますが、ブラウザがスクロールされないため、画面上にSPREADが表示されません
【サンプルコード】
-------------------------
HTML
-------------------------
:
<略>
:
<asp:TextBox ID="TextBox1" runat="server" style="position: relative" TabIndex="1"></asp:TextBox<<br />
<asp:Label ID="Label1" runat="server" Text="Label" style="position: relative" Height="1024px"></asp:Label><br />
<FarPoint:FpSpread ID="FpSpread1" runat="server" BorderColor="Black" BorderStyle="Solid"
BorderWidth="1px" Height="200" Width="400" style="position: relative" TabIndex="2">
<Sheets>
:
<略>
:
回避方法
2009/05/27版で修正済み。
2009/05/27版より前のバージョンでは次の回避方法が有効です。
[Tab]キーでSPREADにフォーカスが移動する際、SPREADのセルの編集を開始します。
【サンプルコード】
-------------------------
クライアント側スクリプト
-------------------------
<script type="text/javascript">
function window.onload()
{
var tx1 = document.getElementById("TextBox1");
tx1.onkeydown = kd;
}
function kd()
{
if (event.keyCode == 9)
{
setTimeout("to()", 100);
}
}
function to()
{
var spread = document.getElementById("FpSpread1");
spread.StartEdit();
}
</script>
2009/05/27版より前のバージョンでは次の回避方法が有効です。
[Tab]キーでSPREADにフォーカスが移動する際、SPREADのセルの編集を開始します。
【サンプルコード】
-------------------------
クライアント側スクリプト
-------------------------
<script type="text/javascript">
function window.onload()
{
var tx1 = document.getElementById("TextBox1");
tx1.onkeydown = kd;
}
function kd()
{
if (event.keyCode == 9)
{
setTimeout("to()", 100);
}
}
function to()
{
var spread = document.getElementById("FpSpread1");
spread.StartEdit();
}
</script>
キーワード
SPRN06967
この文書は、以前は次のバグレポートIDで公開されていました : 7777