This may be totally unrelated, but I was having similar issues on Nexus 7. I eventually determined that the issue occurred only when I had three specific programs active at once: Swiftkey, Nova Prime Launcher, and Facebook. Sometimes I would get this odd pattern, where the screen would seem to zoom in, and then it would lock.
On my S4, I am running Apex instead of Nova and have not had that problem again.
When Facebook's native app wigs on me, I use Friendcaster Pro (which I bought in the way back days, because Facebook had a halfway decent app on Android).