Skip to content

Commit 14932cb

Browse files
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
- Merge Pull Request #23390 from oskarolaussen/magento2:2.3-develop - Merged commits: 1. c029f5a 2. b5f2357 3. f13d718 4. 00b5bfe
2 parents acfafe0 + 00b5bfe commit 14932cb

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)