add code to check effect state while handling hide keyboard request