Merge pull request #5002 from betagouv/js-fix-scroll-exceptions
Usager : corrige une erreur Javascript au moment du Feedback, liée à l'utilisation de `window.scroll`
This commit is contained in:
commit
97dc927289
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
||||
try {
|
||||
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
||||
} catch {
|
||||
window.scroll(0, 0);
|
||||
}
|
||||
<%= remove_element('#user-satisfaction') %>
|
||||
<%= render_flash %>
|
||||
|
|
Loading…
Reference in a new issue