Sidemenu closes on keyboard load


We have a seperate sidemenu for search. When the sidemenu loads and we click on a text field the keyboard naturally opens up, HOWEVER after the keyboard opens the sidemenu is immediately closed, presumably on the keyboard popup. How could we stop the sidemenu from closing when the keyboard pops up then.