Hi,
Ajax doesn't have such bug, this is a browser bug and bad code.
Putting window.close in the onclick of a submit button is bad, because you break the async postback: the browser cannot handle the situation: browser bug.
If you want to close without server side code, use a simple input element (type=button), you don't need an asp:button for this.
If you want some server side code before closing your window, RegisterStartupScript is the (easiest) way, as you find out.