jammesz Posted February 8, 2010 Share Posted February 8, 2010 How can i make my text box have focus all the time while allowing the user to do other actions in the meantime? This is for a game im developing which includes a chat window where the text box is located in. Quote Link to comment Share on other sites More sharing options...
Adam Posted February 8, 2010 Share Posted February 8, 2010 What other actions? Inputs aren't really designed to work like that. What you would probably have to do is set the focus back every time they do these other 'actions'. Quote Link to comment Share on other sites More sharing options...
jammesz Posted February 9, 2010 Author Share Posted February 9, 2010 Yes i know but i was kind of hoping for some 'global window event handler' code that will automatically focus on the text box, without having to add code to every function called to do the same job. Quote Link to comment Share on other sites More sharing options...
Adam Posted February 9, 2010 Share Posted February 9, 2010 Unfortunately there's nothing like that in JS to my knowledge, though I imagine that wouldn't proove an effective solution anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.