summaryrefslogtreecommitdiffstats
path: root/testing/marionette/error.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-04-23 12:17:34 +0200
committerGitHub <noreply@github.com>2018-04-23 12:17:34 +0200
commitbccb9c1708f007ada1ea8c4879db88a587f0a450 (patch)
tree835dacc8cb3df7b05d4b62f4c551d8ad9f791371 /testing/marionette/error.js
parent1ea8529cfb0a246d09daf1ec742d063c08cf1899 (diff)
parentd9d3b687b7c892b400e781dd5c57897efd7173aa (diff)
downloadUXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.gz
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.lz
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.tar.xz
UXP-bccb9c1708f007ada1ea8c4879db88a587f0a450.zip
Merge pull request #238 from janekptacijarabaci/js_dom_pointer_events_2
moebius#195: DOM - PointerEvents - improvements (implement pointerup and pointerdown)
Diffstat (limited to 'testing/marionette/error.js')
-rw-r--r--testing/marionette/error.js21
1 files changed, 17 insertions, 4 deletions
diff --git a/testing/marionette/error.js b/testing/marionette/error.js
index 97cc3fb25..c36dace25 100644
--- a/testing/marionette/error.js
+++ b/testing/marionette/error.js
@@ -260,10 +260,23 @@ class ElementClickInterceptedError extends WebDriverError {
if (obscuredEl && coords) {
const doc = obscuredEl.ownerDocument;
const overlayingEl = doc.elementFromPoint(coords.x, coords.y);
- msg = error.pprint`Element ${obscuredEl} is not clickable ` +
- `at point (${coords.x},${coords.y}) ` +
- error.pprint`because another element ${overlayingEl} ` +
- `obscures it`;
+
+ switch (obscuredEl.style.pointerEvents) {
+ case "none":
+ msg = error.pprint`Element ${obscuredEl} is not clickable ` +
+ `at point (${coords.x},${coords.y}) ` +
+ `because it does not have pointer events enabled, ` +
+ error.pprint`and element ${overlayingEl} ` +
+ `would receive the click instead`;
+ break;
+
+ default:
+ msg = error.pprint`Element ${obscuredEl} is not clickable ` +
+ `at point (${coords.x},${coords.y}) ` +
+ error.pprint`because another element ${overlayingEl} ` +
+ `obscures it`;
+ break;
+ }
}
super(msg);