Hi All,
I have following code:
*<a href="javascript:void(0)" ng-click="setActive($event,question)"
ng-keypress="setActive($event,question)" tabindex="3">*
and the function in controller is
if( event.type == 'click' || ( event.type == 'keypress' &&
event.keyCode == '13' ) )
{
question.isActive = !question.isActive;
}
The issue is, when I hit enter key then both the events i.e click event and
keypress event gets called. This is working fine on mouse click.
Is this issue due to ng-keypress and ng-click on same element?
Please help!!
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.