Capture done button pressed on virtual keyboard in iOS


#1

I have a simple form (without using a form element). I am allowing the user to enter into an input field. Now I want to capture the event when they press the “Done” button on the keyboard. How can I achieve that?


#2

Can anybody help out?


#3

< input ng-blur=“searchRecords()” >
Use ng-blur event on your input when done button is cicked.
Below is the ngBlur directive.
app.directive(‘ngBlur’, function() {
return function( scope, elem, attrs ) {
elem.bind(‘blur’, function() {
scope.$apply(attrs.ngBlur);
}); };});


#4

Will try thanks @Kirtipriya


#5

@Kirtipriya This actually works fine with angular ng-blur.
Thanks for pointing me into the right direction.