       return false
 
     needFixToolbar: () ->
-      static_offset = @toolbar.height()
+      static_offset = $('header').height()
       elem = @editor
       docViewTop = static_offset + $(window).scrollTop()
       docViewBottom = static_offset + docViewTop + $(window).height()
 
-      elemTop = elem.offset().top
+      elemTop = @toolbar_placeholder.offset().top
       elemBottom = elemTop + elem.height()
 
       toolbar_too_high = (elemTop < docViewTop) && (elemBottom > docViewTop)

      for name, dropdown of cfg.dropdowns
        toolbar.addDropdown dropdown if dropdown

      @dynamic_toolbar = @toolbar.clone()
      @dynamic_toolbar.appendTo('body')
      @dynamic_toolbar.css {
          position: 'fixed',
          top: '10%',
          left: @toolbar.offset().left
          display: 'none'
      }

      @editor.parents('form:first').submit () =>
        @save()

        handler: (editor, val) ->
            editor.formatblockSelection(val)
      }
      blocks: {
        name: 'blocks',
        label: 'Blocks',
        options: [
