ghostwriter icon indicating copy to clipboard operation
ghostwriter copied to clipboard

selectAll not working on iPhone safari

Open simplenotezy opened this issue 12 years ago • 1 comments

Could be cool if the function selectAll could also work on mobile devices. I have tested on iPhone 5 Safari, and it doesn't seem to work.

Otherwise, the selectAll could instead clear contents if on a mobile device, as a quick-fix.

simplenotezy avatar Jan 04 '14 13:01 simplenotezy

It seems like the fix is relatively simple:

http://stackoverflow.com/questions/4067469/selecting-all-text-in-html-text-input-when-clicked

Instead of using: this.select();

Use: this.setSelectionRange(0, this.value.length);

simplenotezy avatar Mar 23 '14 13:03 simplenotezy