If the preedit is in invisible state, the last preedit string that was sent around is already null, so there is no need to clear the preedit in that case. (Cherry-picked from commit 0177560952)
0177560952