Bug 1400256 - Bind this.resetValues after performing legacy action chain. r?whimboo
MozReview-Commit-ID: A2r4EEsbFYZ
--- 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