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() {