From 99dccc288e4ab6c61a317437616b79d157e8b68b Mon Sep 17 00:00:00 2001 From: steve hiemstra Date: Thu, 9 Jan 2014 20:15:56 -0500 Subject: [PATCH] manual username & password input fixes #2295 when using browser/plugin auto-complete from what I understand certain browser events are not emmited and thus angular never picks up the new values. This patch adds a fallback using jQuery to set the username & password if the angular properties are not set. see: https://github.com/angular/angular.js/issues/1460 --- public/js/controllers/authCtrl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/controllers/authCtrl.js b/public/js/controllers/authCtrl.js index b4e195d893..97f3540eef 100644 --- a/public/js/controllers/authCtrl.js +++ b/public/js/controllers/authCtrl.js @@ -62,8 +62,8 @@ habitrpg.controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$loca $scope.auth = function() { var data = { - username: $scope.loginUsername, - password: $scope.loginPassword + username: $scope.loginUsername || $('#login-tab input[name="username"]').val(), + password: $scope.loginPassword || $('#login-tab input[name="password"]').val() }; if ($scope.useUUID) { runAuth($scope.loginUsername, $scope.loginPassword);