$('input').on('focus', function() {
$(this).val('example');
$(this).attr('unselectable', 'on').css('user-select', 'none').on('startselect', false);
});
When I try to select field value on Chrome or Opera, I'm able to do that. On Firefox and IE it's fine.
Is there any way to disable text selecting in input field?
IE 10, Chrome 30, Opera 17.
Source: http://jsfiddle.net/VmDDY/