Fix selectionClearFormatting for empty content