Moved spellcheck related code away from the InputTextWidget