I have a lightning component that looks something like this:

<ui:inputTextArea placeholder="Type a message..." rows="1" updateOn="keyup" keyup="{!c.checkKeyPress}"/>

I have a console.log at the very top of checkKeyPress, and that log is never fired. I tried using the blur event as well and still nothing. It would seem that events are just not binding, and the auroMsgBox in the html doesn't show any errors. Does anyone know a fix for this?


Tried the below and it works for me

<aura:component access="Global" >    
   <ui:inputTextArea placeholder="Type a message..." rows="1" updateOn="keyup" keyup="{!c.checkKeyPress}"/>

Controller code:

checkKeyPress : function(component, event, helper) {

Can you check your controller method name for case sensitivity and also check the console.log for logging level as shown in the below screenshot?. enter image description here


The same works for me too. Check the screen shot.

enter image description here

Still if you are not able to see the logs, then try following ways -

  • Change the name of your keyup method
  • Update the browser to latest one, prefer chrome or mozilla
  • Try adding alert instead of console.log, so at-least you will be sure the method is called
  • I tried changing the name of the keyup message, trying in both Chrome and Firefox, and using alert instead of console.log, none of which worked. It's as if the the input is completely ignoring the keyup attribute. What's weird is that I use the same code in another component and everything works fine. Is there anything that's known to cause conflicts? – ROODAY Jun 20 '17 at 13:55
  • Is that the exact code you have shared. Otherwise please share the whole code so that I can check it out once. – Mustafa Jhabuawala Jun 20 '17 at 16:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.