Skip to content
Snippets Groups Projects
Commit be26d272 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Unbind all document.on click/scroll after page fetch

parent c3c84992
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -50,11 +50,13 @@ window.startSpinner = ->
window.stopSpinner = ->
$('.turbolink-spinner').fadeOut()
 
window.stopEndlessScroll = ->
window.unbindEvents = ->
$(document).unbind('scroll')
$(document).off('scroll')
$(document).off('click')
 
document.addEventListener("page:fetch", startSpinner)
document.addEventListener("page:fetch", stopEndlessScroll)
document.addEventListener("page:fetch", unbindEvents)
document.addEventListener("page:receive", stopSpinner)
 
$ ->
Loading
Loading
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