Skip to content

Commit 45cb03a

Browse files
committed
MAGETWO-91504: Mobile PDP accordion widget hides accordion content on phones with iOS
- only scroll to element when element gets out of the viewport
1 parent 684f78e commit 45cb03a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/web/mage/collapsible.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,11 @@ define([
559559
},
560560

561561
/**
562+
* @param {HTMLElement} elem
562563
* @private
563564
*/
564-
_isElementOutOfViewport: function (el) {
565-
var rect = el.getBoundingClientRect();
565+
_isElementOutOfViewport: function (elem) {
566+
var rect = elem.getBoundingClientRect();
566567
return rect.bottom < 0 || rect.right < 0 || rect.left > window.innerWidth || rect.top > window.innerHeight;
567568
}
568569
});

0 commit comments

Comments
 (0)