module.exports = function () {
  var dom = require('../services/dom'),
    noScrollClass = 'noscroll';

  /**
   * @returns {DOMTokenList}
   */
  function getHtmlClassList() {
    return dom.find('html').classList;
  }

  /**
   * Disable scrolling on the page.
   */
  function disableScroll() {
    getHtmlClassList().add(noScrollClass);
  }

  /**
   * Enable scrolling on the page.
   */
  function enableScroll() {
    getHtmlClassList().remove(noScrollClass);
  }

  function constructor(el) {
    disableScroll();
    dom.onRemove(el, enableScroll);

    this.el = el;
  }

  constructor.prototype = {
    events: {
      'click': 'close',
      '.close click': 'close'
    },

    close: function (e) {
      var el = this.el;

      if (e.target === e.currentTarget || e.currentTarget.classList.contains('close')) {
        // we clicked on the overlay itself
        dom.removeElement(el);
      }
    }
  };
  return constructor;
};

@@ -503,29 +503,8 @@
    d
-isableScroll();%0A    d
 om.o
@@ -527,16 +527,219 @@
 leScroll
+);%0A    setTimeout(function () %7B%0A      disableScroll();%0A      // this needs to happen AFTER any onRemove event fires from a previous pane%0A      // since we're switching between panes very quickly%0A    %7D, 0
 );%0A%0A    

kill scrolling when panes are open