Skip to content

Commit 98cae24

Browse files
fix: Avoid scrolling to top when opening search (#440)
Before, the the content always scrolled to the top when opening the search on content pages. Co-authored-by: Robert Schuster <77234379+therobrob@users.noreply.github.com>
1 parent fdf8c9f commit 98cae24

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

assets/sass/search.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ $search-z-index: 12;
147147

148148
.o-search {
149149
&--contentpage {
150-
position: absolute;
150+
position: fixed;
151151
display: none;
152152
opacity: 0;
153153
visibility: hidden;

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{{ if not .IsHome }}
2020
<div
2121
id="search"
22-
class="o-search o-search--contentpage"
22+
class="o-search o-container o-search--contentpage"
2323
data-placeholder="{{ T "search.placeholder" }}"
2424
data-label="{{ T "search.label" }}"
2525
></div>

0 commit comments

Comments
 (0)