Keyboard keeps disappearing without any apparent reason !

A

AC Question

I use a Galaxy S5, running android 6, and i really like the Google now functionality where you can simply hold the home button and have the app read your screen, not too long ago i started using this function to do quick google searches using the google bar that shows up at the top of the screen but EVERY SINGLE TIME without exceptions everytime i start to type suddenly all the text disappears and the keyboard vanishes, and i have to start typing again and the second time works flawlessly, but having to type twice every time is really frustrating, how can i fix that problem ?