1

Possible Duplicate:
Selecting text on focus using jQuery not working in iPhone iPad Browsers

jQuery.select() method selects all text in an input field and the user can easily copy/paste.

$('#linkModal input').live("click", function(){
  $(this).select();
});

easy.

But, this breaks on mobile devices, specifically mobile Safari on iPhone. Possibly because it is a read-only field, but either way I want the user to select it in order to copy/paste.

Form:

<input type="text disabled" readonly="true" value="user needs to copy/past" />
Community
  • 1
  • 1
dylanjha
  • 2,303
  • 4
  • 28
  • 47

0 Answers0