Fixes text selection in UITextInput when cursor is out of the box  

Since fooflare removed their fork, I'm just kind of reopening: #550