This is related to an earlier question that I posted:
Can't edit page after adding custom web part!
Basically, I have created a web part with some javascript. When I add this web part to a page, I can no longer click on the edit icon to make changes to the page. If I retract the web part I can edit again.
I have created a slimmed down version that reproduces the problem below:
<script type="text/javascript">
function test() {
alert('test');
}
window.onload = test;
</script>
<input id="tb_AC" runat="server" />
<br />
If I comment out the window.onload = test;
then edit starts working again. Thoughts?