how to select text in input element in mobile devices without causing copy / paste popup to appear

Viewed 12

I want to select input element content when clicking in it without causing the build in copy paste popup menu to appear in mobile devices.

I use this.select on onClick event for selecting the input content.

 <input  onClick="this.select()" id="myid" />

I tried onselectstart="return false" with no success.

I tried onClick="this.setSelectionRange(0, this.value.length)" with no success.

Any help will be appreciated

Tx

0 Answers
Related