     @$window = $(window)
     @$window.on 'keyup', @escape
     @$window.on 'resize', @resize
+
+    @scrollbar = new Scrollbar $els: $('#main-layout-header')
 
     mediator.on 'modal:close', @close, this
     mediator.on 'modal:opened', @updatePosition, this

      attr('data-state', 'closed').
      one($.support.transition.end, =>
        # Re-enable scrolling
        $('body').removeClass 'is-modal'

        mediator.trigger 'modal:closed'


_                   = require 'underscore'
Backbone            = require 'backbone'
mediator            = require '../../lib/mediator.coffee'
Transition          = require '../mixins/transition.coffee'
{ isTouchDevice }   = require '../../components/util/device.coffee'
Scrollbar           = require '../../lib/scrollbar.coffee'

modalTemplate = -> require('./modal.jade') arguments...

module.exports = class ModalView extends Backbone.View
  id: 'modal'
