Check out this simple fiddle I've created. It should display an alert when you press enter in the textbox. The functionality works in the latest versions of IE and Chrome, but not in Firefox: fiddle
Here's the HTML code:
<div ng-app="app" ng-controller="appCtrl as form">
<input type="text" ng-keypress="form.ProcessSearchKeyPress($event)">
</div>
And here is the JavaScript code:
var app = angular.module('app',[]);
// controller
app.controller('appCtrl', function () {
this.Search = function ()
{
alert('search');
};
this.ProcessSearchKeyPress = function (event)
{
if (event.charCode == 13)
{
this.Search();
}
};
});
It seems like the Search function defined in the controller is not being called in Firefox. Do you know what might be causing this issue?
Any help would be greatly appreciated.