How can I enable auto-select for text in an input field even when it is disabled? Currently, the auto select feature doesn't work when the field is disabled.
Here is my HTML:
<input type="text" class="form-control" ng-model="gameId" select-on-click disabled="true">
And here is my JavaScript code snippet:
angular.module('Admin').directive('selectOnClick', function(){
return {
restrict: 'A',
link: function(scope, element, attrs){
element.on('click', function(){
this.select();
});
}
};
});
I need a solution to make the text selectable even when the form is disabled. Can someone help me achieve this?