Skip to content

Commit 2f59645

Browse files
committed
Firefox: Fixing scrolling to elements in overflow:hidden blocks. Fixes issue #1527
1 parent aac8e08 commit 2f59645

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

javascript/firefox-driver/js/utils.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,12 @@ Utils.scrollIntoView = function(element, opt_elementScrollBehavior, opt_coords)
644644
if (!Utils.isInView(element, opt_coords)) {
645645
element.scrollIntoView(opt_elementScrollBehavior);
646646
}
647+
var overflow = bot.dom.getOverflowState(element, opt_coords);
648+
if (overflow != bot.dom.OverflowState.NONE) {
649+
if (element.scrollIntoView) {
650+
element.scrollIntoView(opt_elementScrollBehavior);
651+
}
652+
}
647653
return bot.action.scrollIntoView(element, opt_coords);
648654
};
649655

0 commit comments

Comments
 (0)