I was wondering if anyone out there has come across a similar issue and can help out.
I have a project which is working great. I wanted to however make it more user friendly especially for tablets. When a field is clicked, I wanted it to select all, so it is easier to edit, or add information.
I searched around and found tons of code, and tried a bunch of codes. It works great in Firefox, Explorer, even Edge and chrome, however when using tablets, it does not select as it's supposed to.
Here is the code that I'm currently using
$(':input').focus(function () {
var $elem = $(this);
$elem.select().mouseup(function (e) {
e.preventDefault();
$elem.unbind(e.type);
});
});
I've tried many variations, and they all work for regular browsers, but not for tablet browsers.
Any suggestions?