Using custom handler to preserve caret position on blur