Try this. Of course, make sure that your input focus line is correctly identifying the input field. I didn’t open the .tpl file to make sure your input part was correct.
You’ll need to put it into the correct file for your version. The one you listed in your original post is probably the file. Try it, if it isn’t, then look around for the correct file.
It works perfect on my version so I’m not sure what is happening wrong on yours. You may want to search the internet for setting focus to inputs within an iframe. Sometimes you need to set focus to the iframe first and then to the input. Since I do not have your version I cannot help much more.