Asaf Shitrit created GUACAMOLE-1178:
---------------------------------------
Summary: Add Keyboard function to allow removal of event listeners
Key: GUACAMOLE-1178
URL: https://issues.apache.org/jira/browse/GUACAMOLE-1178
Project: Guacamole
Issue Type: Improvement
Components: guacamole-common-js
Affects Versions: 1.2.0
Reporter: Asaf Shitrit
*Background*
In some cases where the "document" element of a page is passed to the guacamole
keyboard as the base element to listen for events on text type input elements
in the page stop receiving change events as a result.
By removing through the Dev Tools the specific onkeydown,onkeyup,onkeypress
events that the commons-js lib is listening to those input elements start
working again.
*Improvement* (and how we solved it)
We changed the way the listenTo works to start working with non-anonymous
functions and added a "cleanUp" function that removes the following event
listeners from the given "element" argument given at the constructor level.
At this point we could hook our inner logic to affect how dom events were
subscribed to and unsubscribed at the guacamole commons code level which solved
our issue
Ill be happy to provide a PR if necessary to fix this issue :)
Tnx in advance
--
This message was sent by Atlassian Jira
(v8.3.4#803005)