Uh oh!
There was an error while loading. Please reload this page.
footer.hbs: tweak scrollToTop. - #2465
Conversation
* use `addEventListener` * use `event.preventDefault()` * remove unneeded parentheses * remove `$` from the variable name
| var $scrollToTop = document.getElementById('scroll-to-top'); | ||
| var scrollToTop = document.getElementById('scroll-to-top'); | ||
| (window.onscroll = function() { |
There was a problem hiding this comment.
If I change this to use addEventListener then the link shows on page load. Maybe this can be improved further, so any ideas welcome.
lpinca
left a comment
There was a problem hiding this comment.
Mostly a cosmetic change but LGTM anyway.
XhmikosR
commented
Sep 27, 2019
@lpinca: how about changing |
lpinca
commented
Sep 27, 2019
I'm fine with that if it works. |
XhmikosR
commented
Sep 27, 2019
It doesn't work, hence why I'm asking for ideas :P |
Trott
commented
Sep 28, 2019
Since the current version works, will land this for now so it doesn't stall. The additional troubleshooting/discussion can certainly happen subsequently. |
addEventListenerevent.preventDefault()$from the variable name