0

I am trying to read text present in the textfield. I need to read every character enter at the time when it enter, So therefor I am using

keypress: function(cmp,e) { 
        cmp.value;
        cmp.getValue();
    }

But this event is fireing as soon as I pressed key. So it not taking the value of key which I entered. It taking in second time. How to resolve it.

How to take the value from textfield and read on key press event

David
  • 4,266
  • 8
  • 34
  • 69

1 Answers1

2

Use keyup event instead of keypress event.

Check below link for more details.

onKeyPress Vs. onKeyUp and onKeyDown

Community
  • 1
  • 1
Faizal
  • 250
  • 1
  • 8