When I am texting my keyboard keeps disappearing and if I tap the message it will come back up and then disappear in a few more letters.
Does it happen even when you're browsing websites? How about you install a different keyboard and observe if the problem persist.
Please let us know how it goes.