From 2d645734379842b553be9fa47a87a120adf467e0 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Thu, 21 Jul 2011 13:18:59 +0200 Subject: [PATCH] fix scrollbars for osx lion --- lib/ace/scrollbar.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ace/scrollbar.js b/lib/ace/scrollbar.js index a5a31873..55a75b33 100644 --- a/lib/ace/scrollbar.js +++ b/lib/ace/scrollbar.js @@ -51,8 +51,11 @@ var ScrollBar = function(parent) { parent.appendChild(this.element); + // in OSX lion the scrollbars appear to have no width. In this case resize + // the to show the scrollbar but still pretend that the scrollbar has a width + // of 0px this.width = dom.scrollbarWidth(); - this.element.style.width = this.width + "px"; + this.element.style.width = (this.width || 15) + "px"; event.addListener(this.element, "scroll", this.onScroll.bind(this)); };