0

Like get cursor position in text, I want to get the mouse cursor position in text using ng-keydown function:

So if the user wants to delete the x char in String I will get x.

<input 
     name="inputText" 
     type="text" 
     ng-keypress="changeInput($event)"
     ng-keydown="backSpace($event)"
 >

controller:

vm.changeInput = function(e){
   e.preventDefault();
   //get cusor position in input text
   //some more logic goes here

};

Thanks.

Community
  • 1
  • 1
Itsik Mauyhas
  • 3,824
  • 14
  • 69
  • 114

0 Answers0