Further tweaks to input kludge

Issue #1196

Makes sure placeholder text is restored after deleting it

Fixes problem with editor that is initialized when hidden, and
thus won't allow selectionStart/End to be set.