fixed the previous issue on switching between textFields

added a condition to check weather a keyboard is present on screen