From 40e79a8a73916257c586e27cadafeeda9a6fd123 Mon Sep 17 00:00:00 2001 From: Dominik Korsa Date: Mon, 4 Mar 2019 16:08:16 +0100 Subject: [PATCH] Change smooth scroll to javascript --- src/components/HomeMainHeader.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/HomeMainHeader.vue b/src/components/HomeMainHeader.vue index 9b8258f..886d6ac 100644 --- a/src/components/HomeMainHeader.vue +++ b/src/components/HomeMainHeader.vue @@ -43,11 +43,20 @@ export default { eventAction: 'click', }); }, - otherOptionsClick() { + otherOptionsClick(e) { this.$ga.event({ eventCategory: 'other-download-options-link', eventAction: 'click', }); + + const element = document.getElementById('download'); + if (element.scrollIntoView) { + e.preventDefault(); + + element.scrollIntoView({ + behavior: 'smooth', + }); + } }, discordClick() { this.$ga.event({