SOAP-752: Select correct text field based on caret position