So, the problem turned out to be that 'Enter' triggered a cancel button to fire.
Do you see what is in its markup making it react on Enter?
<div class="modal-footer">
<button class="btn btn-warning" data-dismiss="modal" aria-hidden="true" ng-click="$dismiss()">{{ cancelLabel }}</button>
<button type="submit" class="btn btn-primary" ng-class="okClass" ng-click="$close(passNo)" id="btnSaveSwipe">@Labels.save</button>
</div>
?
UPDATE. Of course, by default every button is type submit! I added type="button" and the problem is solved!
If it's not broken, fix it until it is.
My Blog