Run code when the input box gets focus
I want to detect when the input box gets focus from the user. You'd hope something like
$("#myInputID").click(function(){…}); or
$("#myInputID").focus(function(){…});
would work, and it does, but the code also gets run when you click on an item in the results list. I don't want to know that.
The reason I want this is because I have a particular input box where the user is only allowed to have one item at a time. If they click back in the input box, I want to be able to clear it for them.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac