Bug 1400256 - Bind this.resetValues after performing legacy action chain. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Thu, 05 Oct 2017 13:01:23 +0100
changeset 680843 e98c5edbbb4823770bf3dc2c47e59fdddbaab832
parent 680842 87fff81595c39de3c519f39895954b99e6fdeada
child 680844 6286dd066bd5e4a4f563c68bd7ff5c825b0fee3a
push id84656
push userbmo:ato@sny.no
push dateMon, 16 Oct 2017 14:02:26 +0000
reviewerswhimboo
bugs1400256
milestone58.0a1
Bug 1400256 - Bind this.resetValues after performing legacy action chain. r?whimboo MozReview-Commit-ID: A2r4EEsbFYZ
testing/marionette/legacyaction.js
--- a/testing/marionette/legacyaction.js
+++ b/testing/marionette/legacyaction.js
@@ -76,17 +76,17 @@ action.Chain.prototype.dispatchActions =
     shiftKey: false,
     ctrlKey: false,
     altKey: false,
     metaKey: false,
   };
 
   return new Promise(resolve => {
     this.actions(commandArray, touchId, 0, keyModifiers, resolve);
-  }).catch(this.resetValues);
+  }).catch(this.resetValues.bind(this));
 };
 
 /**
  * This function emit mouse event.
  *
  * @param {Document} doc
  *     Current document.
  * @param {string} type