It seems that I ran into a problem related to the edge when selecting all the text in the input field. I use angular ng-focus to call a function in the controller to select all the text in the field.
function selectAllTextOnFocus($event) {
$event.target.select();
}
This works fine in all browsers except the microsoft edge, which will not select text in the input field.
I also tried another jquery solution that works, except for the first selection of the input field. After that, he works as intended and selects all the text.
$('input').on('focus', function (e) {
$(this).one('mouseup', function () {
$(this).select();
return false;
}).select();
});
Is this just a known edge issue or am I missing something?
source
share