jQuery1.4.2のバグなのでしょうか?
MyHome Portalで使用しているjQueryのバージョンを1.3.2から1.4.2に変えてみようと思いテストをしたところ、不具合が発生することが判明。
しかし、これがjQueryのバグなのかMyHome Portal側の問題なのか分かりません。対処方法もよくわかりません。どなたか、アドバイスをお願いします。
不具合はIE6でのみ発生します。障害切り分けのためのためのhtmlを作成してみました。
以下のように、position:relative;(height指定あり)で囲まれたposition:absolute;のdivを、jQueryの.html()で書き換えると、IE6ではそのdivの上下が詰まってしまいます。IE6以外では問題は発生しません。
サンプルを以下に置きました。
【jQuery1.3.2版】
http://ok2nd.web.fc2.com/jquery-test/test-1.3.2.html
【jQuery1.4.2版】
http://ok2nd.web.fc2.com/jquery-test/test-1.4.2.html
【jQuery未使用版】
http://ok2nd.web.fc2.com/jquery-test/test-no-jquery.html
<head><style type="text/css">
#frame {
position: relative;
width: 660px;
height: 300px;
margin: 2px 0 0 0;
}
#side_bar {
position: absolute;
top: 30px; left: 0px; width: 120px; height: 70%;
border: 1px solid #666; padding: 6px; overflow:scroll;
}
</style>
</head>
<body>
<script type="text/javascript" src="jquery-1.x.x.js"></script>
<script type="text/javascript">
$(function() {
$("#side_bar").html("...jQuery");
});
</script>
<div id="frame">
<div id="side_bar">Loading...</div>
</div>