Input: How to differentiate ENTER pressed from focusOut #6920
              
                Unanswered
              
          
                  
                    
                      maitefdupont
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 2 comments
-
| Thanks for reaching out! As the Input component is developed in the UI5 Web Components repository, I'll forward this discussion to their repository. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            -
| If you want to only capture ENTER events, you can use the keyup event on the element itself. Here's some sample code: Here's the MDN documentation for the event. | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
According to the Input Docs, onchange is triggered when ENTER is pressed or on focus out.
In reality these two events are very different. In case of focusout, the user may still be in the middle of typing and will come back. When ENTER is pressed, it should signal that work is done.
My question is, how to differentiate the two?
Many thanks for the support!
Beta Was this translation helpful? Give feedback.
All reactions