Uploaded image for project: 'Guacamole'
  1. Guacamole
  2. GUACAMOLE-1178

Add Keyboard function to allow removal of event listeners

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2.0
    • None
    • guacamole-common-js
    • None

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            Asaf.S Asaf Shitrit
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 24h
                24h
                Remaining:
                Remaining Estimate - 24h
                24h
                Logged:
                Time Spent - Not Specified
                Not Specified