Bug 1255955 - Recalculate visibility after scrolling; r=automatedtester, a=test-only
authorAndreas Tolfsen <ato@mozilla.com>
Fri, 05 Aug 2016 11:00:19 +0100
changeset 332800 f1da984b8731e75e13b1b523cee9f275d6276939
parent 332799 decf2949ae6ca51b8591e901fe7e78455b5b4d12
child 332801 fc55305fb268a9bc21654175e17df5118bed007d
push id9925
push userryanvm@gmail.com
push dateSat, 20 Aug 2016 01:43:22 +0000
treeherdermozilla-aurora@f4aa3c3af595 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersautomatedtester, test-only
bugs1255955
milestone50.0a2
Bug 1255955 - Recalculate visibility after scrolling; r=automatedtester, a=test-only We want to redo the element interactability calculation after scrolling. Determining if an element is not visible by the old location would be wrong. MozReview-Commit-ID: KGaPVmgcqSX
testing/marionette/interaction.js
--- a/testing/marionette/interaction.js
+++ b/testing/marionette/interaction.js
@@ -90,16 +90,17 @@ interaction.clickElement = function(el, 
   let win = getWindow(el);
 
   let visible = false;
   if (specCompat) {
     visible = element.isInteractable(el);
     if (!visible) {
       el.scrollIntoView(false);
     }
+    visible = element.isInteractable(el);
   } else {
     visible = element.isVisible(el);
   }
 
   if (!visible) {
     throw new ElementNotVisibleError("Element is not visible");
   }