Bug 1273275: scroll to the top of elements before interacting r?ato
This allows us to converge with webdriver project which scrolls to the
start of the element instead of the end.
MozReview-Commit-ID: ErQ18bTeo5m
--- a/testing/marionette/element.js
+++ b/testing/marionette/element.js
@@ -839,17 +839,17 @@ element.isVisible = function(el, x = und
}
if (el.tagName.toLowerCase() == "body") {
return true;
}
if (!element.inViewport(el, x, y)) {
if (el.scrollIntoView) {
- el.scrollIntoView(false);
+ el.scrollIntoView({block: "start", inline: "nearest"});
if (!element.inViewport(el)) {
return false;
}
} else {
return false;
}
}
return true;