Can't focus on Textfield when webplayer is online

Hello Unity masters !

I am nearly done with my web project but only one thing still bother me.

When I ask the player to type his name for the scoreboard, a textfield shows up.
I use the GUI.FocusControl to focus on the textfield to avoid the player to click in the textfield.

Here is the code :

function OnGUI ()
{
     if (dispNameInput)
		{
                         // Set the internal name of the textfield
		          GUI.SetNextControlName ("MyTextField");
		
                         // Make the actual text field.
		          curName = GUILayout.TextField (curName.ToUpper(),9);// Got ot put the string variable before to have the textfield editable (typable)

		   			
		         if (focusOnplayerName)
		         {
			              focusOnplayerName	= false;
			              GUI.FocusControl ("MyTextField");	// focus on input player name

		         }
             }
}

When I do a webplayer build and open the html file to test it, the focus is PERFECTLY done.
But when I put the same files on my website and test it, the focus is NOT done. And above all, when the player type his name, sometimes, the typing get stuck.

You can try the game if you want to test :

www.keykillerz.com

(when you lose, the game ask for saving the score. choose “yes” to see the problem with player’s name texfield)

Thanks for your help.

First of all what a really fun game!

I’m not quite sure this is correct, but I’m guessing it’s because your web player application does not have focus. This does not affect that many things other than a few mouse issues and some OnGUI stuff and maybe your problem(GUI.FocusControl).

You can test it by adding the function OnApplicationFocus and logging on it and then re-testing again when you know your application has focus.