js: fix errors on browsers not supporting window.scroll options
IE and Safari only know about `window.scroll(x, y)`, and not the form with options.
This commit is contained in:
parent
6dbbaf9528
commit
52afb41bab
1 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
try {
|
||||||
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
window.scroll({ top: 0, left: 0, behavior: 'smooth' });
|
||||||
|
} catch {
|
||||||
|
window.scroll(0, 0);
|
||||||
|
}
|
||||||
<%= remove_element('#user-satisfaction') %>
|
<%= remove_element('#user-satisfaction') %>
|
||||||
<%= render_flash %>
|
<%= render_flash %>
|
||||||
|
|
Loading…
Reference in a new issue