Apex Designer Documentation
What's New
Getting Started
Projects
Business Objects
Processes
User Interfaces
App Behaviors
Files
Dependencies
Project Settings
Libraries
Patterns and Best Practices
App Showcase
Frequently Asked Questions

Trigger Action On Enter

How to use Angular pseudo events to trigger an action when the user presses enter.

Blank Profile Image
Written by Ashish Gupta
Updated 3 years ago
Less than a minute read

You can use a button to trigger a method after the user has entered text in an input field. But for a better user experience, you can make the input field itself trigger that method when enter is pressed, by using Angular pseudo event keyup.enter:

Input component with attribute to trigger a method on enter

Tweak for Safari on iOS

As noted in this Angular issue, the keyup.enter pseudo event may not work for all users on Safari on iOS. The root cause is that iOS automatically capitalizes the first letter of words. It does this by automatically selecting the shift key after a word. The resulting event is keyup.shift.enter instead of keyup.enter. This could be handled by adding a second event handler but it is even easier to turn off automatic capitalization on the input:

Input component with attribute to trigger a method on enter for Safari on iOS
Powered by Apex Designer
Terms of ServicePrivacy Policy
© 2017-2024 Apex Process Consultants