MDL-72783 usertours: Fix the tour display for pages with drawers

This commit is contained in:
Huong Nguyen 2021-12-16 15:41:52 +07:00 committed by Shamim Rezaie
parent 4f9a539600
commit 524f75797a
3 changed files with 10 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1435,10 +1435,14 @@ const Tour = class {
let drawertop = 0;
if (targetNode.parents('[data-usertour="scroller"]').length) {
drawertop = targetNode.parents('[data-usertour="scroller"]').scrollTop();
background.css({
position: 'fixed'
});
const scrollerElement = targetNode.parents('[data-usertour="scroller"]');
const navigationBuffer = scrollerElement.offset().top;
if (scrollerElement.scrollTop() >= navigationBuffer) {
drawertop = scrollerElement.scrollTop() - navigationBuffer;
background.css({
position: 'fixed'
});
}
}
background.css({