Fix input method committing

On mobile devices the virtual keyboard would in some situations not have
words committed yet - this leads to the last word after a space being
cut off when querying for the text property.

Change-Id: I23d81154f3bed1dd287f24c3c5f958cf4335475c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>