jmuehlner commented on code in PR #942:
URL: https://github.com/apache/guacamole-client/pull/942#discussion_r1451001133
##########
guacamole/src/main/frontend/src/app/client/controllers/clientController.js:
##########
@@ -139,6 +139,21 @@ angular.module('client').controller('clientController',
['$scope', '$routeParams
};
+ /**
+ * True if and only if a "guacFieldFocused" event was received, and a
+ * corresponding "guacFieldBlurred" event has not yet been received.
+ * This is intended to allow fields to receive keyboard input even when
+ * the menu is not being shown.
+ *
+ * @type {boolean}
+ */
+ $scope.fieldIsFocused = false;
+
+ // Enable and disable the custom field focused state as the relevant
+ // events are received
+ $scope.$on('guacFieldFocused', () => $scope.fieldIsFocused = true);
+ $scope.$on('guacFieldBlurred', () => $scope.fieldIsFocused = false);
Review Comment:
Good call, preventing `guacBeforeKeyup` and `guacBeforeKeydown` in my
extension works just fine. I'll do that instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]