If the text is empty, the IME may call deleteSurroundingText(1, 0) if the user hits the delete key. The selection should remain at position 0 if this happens.