Thanks StackOverflow, I found a very easy hack which does the job:
JQuery sets the autofocus on the first input that is found.
So play it sneaky by creating a "fake" input at the first line of your dialog like that:
<input type='text' size='1' style='position:relative;top:-500px;' />
So your input will be out of the window and have the focus. Problem solved for me ;p