From 6b0b90a37cf3f382ee70d9af96c3c8a565091dd8 Mon Sep 17 00:00:00 2001 From: Ashley Bailey Date: Fri, 8 Apr 2022 01:01:15 +0100 Subject: [PATCH] Update VStep.vue Without 'block: "center' in the scrollIntoView method it will default to scrolling the page until the element is at the very top of the page, for most users they will want the tour step to be in the center of the page instead, adding this will account for that. --- src/components/VStep.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/VStep.vue b/src/components/VStep.vue index 3800522..61c4684 100644 --- a/src/components/VStep.vue +++ b/src/components/VStep.vue @@ -145,7 +145,7 @@ export default { jump(this.targetElement, jumpOptions) } else { // Use the native scroll by default if no scroll options has been defined - this.targetElement.scrollIntoView({ behavior: 'smooth' }) + this.targetElement.scrollIntoView({ behavior: 'smooth', block: 'center' }) } } },