 
   scrollTo: (el) ->
     offset = el.offsetTop - window.innerHeight
-    document.body.scrollTop = offset
+    document.documentElement.scrollTop = offset
 
   setItemStatus: (status, id) ->
     elClass = 'music-list-item'


  setProgressBar: (id, percent) =>
    el = document.getElementById "music-list-item-bar_#{id}"
    if not el then throw new Error "No element with id #{id}"
    el.style.width = percent + '%'
    if percent is 100 then @setItemStatus 'downloaded', id 
    if percent is 0 then @scrollTo el.parentNode.nextSibling


    @registerDomEvents()
    @changeDlFolderLabel @params.dlPath
    @changeDlThreadsInput @params.dlThreads
    @barsWidth = document.getElementById('music-list').offsetWidth

  subscribe: (method, callback) ->
    @subscribers.push {'method': method, 'callback': callback}
