Subject of the issue
$(selector).offset() can return incorrect values; the variable below always evaluates to a truthy since all elements have html as an ancestor:
|
const isCorrectedContainer = $element.parents().add($element).filter('html,body,#app').length; |
This should be amended to:
const isCorrectedContainer = $element.is('html', 'body', '#app') ||
$element.parents().is('#app');
Steps to reproduce
- Set
"_scrollingContainer": { "_isEnabled": true } in the config JSON
- Run
$('.nav').offset() in the console
Expected behaviour
$('.nav').offset()
{top: 0, left: 0}
Actual behaviour
$('.nav').offset()
{top: -56, left: 0}
Subject of the issue
$(selector).offset()can return incorrect values; the variable below always evaluates to a truthy since all elements havehtmlas an ancestor:adapt_framework/src/core/js/scrolling.js
Line 59 in b523095
This should be amended to:
Steps to reproduce
"_scrollingContainer": { "_isEnabled": true }in the config JSON$('.nav').offset()in the consoleExpected behaviour
Actual behaviour