Skip to content
Snippets Groups Projects
Unverified Commit 4bca3b24 authored by Olivia Simonet's avatar Olivia Simonet Committed by GitHub
Browse files

Search : fix de la fermeture avec le bouton et de l'overlay (#728)

parent 90cdbb4a
No related branches found
Tags v7.0.6
No related merge requests found
......@@ -2,7 +2,7 @@
import { focusTrap } from '../utils/focus-trap';
const CLASSES = {
modalOpened: 'has-modal-opened'
modalOpened: 'has-search-opened'
};
class Search {
......@@ -97,8 +97,10 @@ class Search {
message = this.element.querySelector('.pagefind-ui__message'),
results = this.element.querySelector('.pagefind-ui__results');
this.input.value = '';
this.searchInstance.triggerSearch(false);
if (this.input) {
this.input.value = '';
this.searchInstance.triggerSearch(false);
}
if (message) {
message.innerText = '';
......
......@@ -34,7 +34,7 @@ header#document-header
&.is-sticky
.pagefind-ui__toggle
color: $header-sticky-color
html.is-scrolling-down:not(.has-menu-opened, .has-modal-opened) &
html.is-scrolling-down:not(.has-menu-opened, .has-modal-opened, .has-search-opened) &
@include media-breakpoint-down(desktop)
transform: translateY(-100%)
@include media-breakpoint-up(desktop)
......@@ -136,6 +136,7 @@ body
html.has-menu-opened &,
html.has-modal-opened &,
html.has-offcanvas-opened &,
html.has-offcanvas-opened &
overflow: hidden
height: 100%
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment