From 4d537575bc2db181132f24b4322d0231fb8f7dab Mon Sep 17 00:00:00 2001 From: MaysWind Date: Tue, 10 May 2022 02:22:45 +0800 Subject: [PATCH] code refactor --- src/scripts/controllers/new.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scripts/controllers/new.js b/src/scripts/controllers/new.js index 25fce98f..802f94ea 100644 --- a/src/scripts/controllers/new.js +++ b/src/scripts/controllers/new.js @@ -200,7 +200,9 @@ }; $scope.urlTextboxKeyDown = function (event) { - if (event.keyCode === 13 && event.ctrlKey && $scope.newTaskForm.$valid) { + var keyCode = event.keyCode || event.which || event.charCode; + + if (keyCode === 13 && event.ctrlKey && $scope.newTaskForm.$valid) { $scope.startDownload(); } };