Skip to content

Commit c297c40

Browse files
committed
trigger scroll only on mobile
1 parent c618bc6 commit c297c40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

static/to_compile/js/search_solution_form_controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ export default class extends Controller<HTMLElement> {
199199
}
200200

201201
this.acteurDetailsPanelTarget.dataset.exitAnimationEnded = "false"
202-
this.acteurDetailsPanelTarget.scrollIntoView()
202+
if (window.matchMedia('screen and (max-width:768px)').matches) {
203+
this.acteurDetailsPanelTarget.scrollIntoView()
204+
}
205+
203206

204207
}
205208

0 commit comments

Comments
 (0)