From 60f7ed1b1a9e63c0e660ad7cb4ae14a5c857bd87 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Sep 30 2021 15:43:51 +0000 Subject: coreos-download.js: don't jump back up to page when changing arches Minor followup to #199. This prevents the `#` href to be taken literally and causing the page to jump back to the top when changing arches. --- diff --git a/sites/static/js/coreos-download.js b/sites/static/js/coreos-download.js index ea0e7aa..f0a5220 100644 --- a/sites/static/js/coreos-download.js +++ b/sites/static/js/coreos-download.js @@ -214,6 +214,7 @@ var coreos_download_app = new Vue({ }, // Handle the dropdown for architectures toggleArch: function (e) { + e.preventDefault(); coreos_download_app.architecture = e.target.text const currentShownKey = Object.keys(IdPool).find(key => IdPool[key] === coreos_download_app.shownId); const downloadPageUrl = window.location.href.match(/^.*\/coreos\/download/)[0];