Commit be26d272 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Unbind all document.on click/scroll after page fetch

parent c3c84992
......@@ -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)
$ ->
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment