I had this issue with my nexus, periodically with my HTC phone. Sorry to say I don’t have an answer but I DO feel your pain. Usually I get round it by switching between keyboard apps, and then back again when that one inevitably seems to have issues.
I swear there is always some incredibly annoying first- world problem with one of my devices. I like to use swype keyboard. Its my keyboard of choice, but whenever I put it on my nexus 7 it seems unable to put a space between words, despite that particular box being ticked.
Technology – Great in the most part, but slowly drives you mental…
*An Apple fanboi will be along shortly to advise you that ‘Apple….. It just works…’. 👿
Good luck, try rebooting it maybe. Try another keyboard app.