Uploaded image for project: 'Apache Guacamole - Contributions'
  1. Apache Guacamole - Contributions
  2. GUAC-749

Guacamole Mouse shows error message for mouseout event

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.9.1
    • Fix Version/s: None
    • Component/s: guacamole-common-js
    • Labels:
      None
    • Environment:
      ubuntu 12.04

      Description

      The mouseout event for Guacamole Mouse in guacamole-common-js module shows error message "target is not undefined". By examining the code , it is discovered that at all.js line 5037, there is a while loop checking the variable

      while (target !== null) {
                  if (target === element)
                      return;
                  target = target.parentNode;
              }

      which would left undefined case unchecked.

        element.addEventListener("mouseout", function(e) {
       
              // Get parent of the element the mouse pointer is leaving
             	if (!e) e = window.event;
       
              // Check that mouseout is due to actually LEAVING the element
              var target = e.relatedTarget || e.toElement;
              while (target !== null) {
                  if (target === element)
                      return;
                  target = target.parentNode;
              }
       
              cancelEvent(e);
       
              // Release all buttons
              if (guac_mouse.currentState.left
                  || guac_mouse.currentState.middle
                  || guac_mouse.currentState.right) {
       
                  guac_mouse.currentState.left = false;
                  guac_mouse.currentState.middle = false;
                  guac_mouse.currentState.right = false;
       
                  if (guac_mouse.onmouseup)
                      guac_mouse.onmouseup(guac_mouse.currentState);
              }
       
          }, false);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              gordon.lau Gordon Lau
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: