Is it possible to select all input text on iphone device when focus / click?
iphone, jquery, jquery-mobile, select
Solution
Basically you have to REARRANGE the events focus, then click, then touchstart
$('#myID').on('focus click touchstart', function(e){
$(this).get(0).setSelectionRange(0,9999);
//$(this).css("color", "blue"); FUBAR
e.preventDefault();
});
Problem
Is it possible to select all input text on iphone device when focus / click? Typically for a browser environment one would use: ``` $('input').bind("click focus", function() { $(this).select(); }); ``` This works for desktop browsers but appears unresponsive for iphone and presumably other mobile devices.