prevent flickering and hide keyboard after user sends message on mobile