added text selection API for input tag
added text selection API for textarea