Bug 902847: discard trailing whitespace in latin im to keep it in sync with contenteditable elements