Added tabindex and focus handler to focus a real input when appropriate.