Skip to content

Commit b5f2357

Browse files
committed
Changed logic so that _scrollToTopIfVisible is called only if element is in viewport. Previously it was called only when the element was outside it. Also changed the logic of _isElementOutOfViewport to work correctly.
1 parent c029f5a commit b5f2357

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/web/mage/collapsible.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,6 @@ define([
582582
*/
583583
_isElementOutOfViewport: function (elem) {
584584
var rect = elem.getBoundingClientRect();
585-
586585
return rect.bottom > window.innerHeight || rect.right < 0 || rect.left > window.innerWidth || rect.top < 0;
587586
}
588587
});

0 commit comments

Comments
 (0)