popup keyboard now closes and opens correctly on button press