diff --git a/app/views/contests/_category_selector.html.slim b/app/views/contests/_category_selector.html.slim index 395d3ba..2ac3d2e 100644 --- a/app/views/contests/_category_selector.html.slim +++ b/app/views/contests/_category_selector.html.slim @@ -15,5 +15,5 @@ if (option.value == selectedCategory) option.selected = true; }); categorySelectEl.addEventListener('change', (e) => { - window.location.href = `/public/#{@contest.slug}?category=${e.target.value}` + window.location.replace(`/public/#{@contest.slug}?category=${e.target.value}`); }) \ No newline at end of file diff --git a/app/views/contests/show.html.slim b/app/views/contests/show.html.slim index 98bec3f..a85640d 100644 --- a/app/views/contests/show.html.slim +++ b/app/views/contests/show.html.slim @@ -61,7 +61,7 @@ javascript: if (option.value == selectedCategory) option.selected = true; }); categorySelectEl.addEventListener('change', (e) => { - window.location.href = `#{contest_path(@contest)}?category=${e.target.value}` + window.location.replace(`#{contest_path(@contest)}?category=${e.target.value}`); }) .d-flex.flex-column style="overflow-y: auto" table.table.table-striped.table-hover