Skip to content

Commit 1c65a63

Browse files
authored
ENGCOM-5362: Changed logic so that _scrollToTopIfVisible is called only if element is in viewport. Previously it was called only when the element was outside it. #23390
2 parents 042d71e + 14932cb commit 1c65a63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/web/mage/collapsible.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ define([
570570
* @private
571571
*/
572572
_scrollToTopIfVisible: function (elem) {
573-
if (this._isElementOutOfViewport(elem)) {
573+
if (!this._isElementOutOfViewport(elem)) {
574574
elem.scrollIntoView();
575575
}
576576
},

0 commit comments

Comments
 (0)