From 06e21af2f4154534efd0f14beecf3e277798e913 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Wed, 28 Apr 2010 09:29:50 +0200 Subject: [PATCH] fix: Horizontal scrollbar breaks selection --- css/editor.css | 4 +--- src/ace/VirtualRenderer.js | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/css/editor.css b/css/editor.css index a28f10f4..e8aa4bbc 100644 --- a/css/editor.css +++ b/css/editor.css @@ -29,20 +29,19 @@ } .layer { + z-index: 0; position: absolute; overflow: hidden; white-space: nowrap; } .text-layer { - z-index: 2; font-family: Monaco, "Courier New", monospace; cursor: text; color: black; } .cursor-layer { - z-index: 3; } .cursor { @@ -55,7 +54,6 @@ } .marker-layer { - z-index: 1; } .marker-layer .selection { diff --git a/src/ace/VirtualRenderer.js b/src/ace/VirtualRenderer.js index 3b87e938..d17c8fa7 100644 --- a/src/ace/VirtualRenderer.js +++ b/src/ace/VirtualRenderer.js @@ -62,7 +62,8 @@ ace.VirtualRenderer = function(container) { }; this.getMouseEventTarget = function() { - return this.scroller; + // return top most layer + return this.cursorLayer.element; }; this.getFirstVisibleRow = function() {