Messagebar hides keyboard on focus in Android

So i put the messagebar and the messages-content inside a sheet modal. And whenever i try to focus on the messagebar the keyboard appears and then disappears. i tried many things and couldn’t do anything. at last i gave up and decided to ask if anyone knows why this happens