Fix cross browser bugs with spaces and focus.