MDL-85287 User tours: Avoid scrolling while backdrop is displayed

If the page scrolls while the backdrop is displayed, it looks
incorrect because the backdrop does not scroll with page content.
To avoid this, don't show the backdrop until scrolling has finished.
This commit is contained in:
sam marshall
2025-10-20 09:56:54 +01:00
parent d33ecac29c
commit b16fb691e0
3 changed files with 3 additions and 5 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -3
View File
@@ -808,9 +808,6 @@ const Tour = class {
targetNode.data('flexitour', 'target');
// Add the backdrop.
this.positionBackdrop(stepConfig);
$(document.body).append(currentStepNode);
this.currentStepNode = currentStepNode;
@@ -826,6 +823,7 @@ const Tour = class {
.animate({
scrollTop: this.calculateScrollTop(stepConfig),
}).promise().then(function() {
this.positionBackdrop(stepConfig);
this.positionStep(stepConfig);
this.revealStep(stepConfig);
pendingPromise.resolve();