This will keep the focus:
Code:
<html>
<head>
<meta>
<title>Untitled Document</title>
<script type="text/javascript">
onload=function() {
var obj = document.getElementsByName("textfield")[0];
obj.onblur = function() {obj.focus()}
}
</script>
</head>
<body>
<div style="height:100%; width:100%; overflow:auto;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<input type="text" name="textfield" /> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>1. Click and place the cursor in the above text input. Drag the page down and come back. Now see, cursor is not there.<br><strong>OR</strong><br>2. Click and place the cursor in the above text input. Just click on the scroll bar and see the cursor will disappear from the input type.<br><br>Workimg fine in Firefox.
<p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p>
</td>
</tr>
</table>
</div>
</body>
</html>
Bookmarks