| document.getElementById('mydiv').focus(); |
| exceptions += "Exception: " + e + "\n"; |
| document.getElementById('result').focus(); |
| exceptions += "Exception: " + e + "\n"; |
| if (pass1 && pass2 && pass3) { |
| document.getElementById('result').innerHTML = result; |
| document.getElementById('exc').innerHTML = exceptions; |
| <body onload="focusIt()"> |
| This test will try to call focus() on a contenteditable div, and then a normal div. |
| <br>The window should scroll to reveal the contenteditable div. |
| <div style="width:500px;height:800px"></div> |
| <div id="mydiv" onfocus="pass3 = true;" style="border-style:solid" contenteditable>contentEditable div</div> |