From 12a24647566fe3ad04d01d7e010dd88df2802714 Mon Sep 17 00:00:00 2001 From: DanyaPostfactum Date: Sat, 26 Oct 2013 15:13:15 +1100 Subject: [PATCH] Change mouse capture target container -> content To prevent hover activity of scrollbars in Firefox --- lib/ace/mouse/default_handlers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ace/mouse/default_handlers.js b/lib/ace/mouse/default_handlers.js index 0c0da34c..d0c795d1 100644 --- a/lib/ace/mouse/default_handlers.js +++ b/lib/ace/mouse/default_handlers.js @@ -118,8 +118,8 @@ function DefaultHandlers(mouseHandler) { editor.selection.clearSelection(); } }.bind(this), 0); - if (editor.container.setCapture) { - editor.container.setCapture(); + if (editor.renderer.content.setCapture) { + editor.renderer.content.setCapture(); } editor.setStyle("ace_selecting"); this.setState("select"); @@ -185,8 +185,8 @@ function DefaultHandlers(mouseHandler) { this.selectByWordsEnd = this.selectByLinesEnd = function() { this.editor.unsetStyle("ace_selecting"); - if (this.editor.container.releaseCapture) { - this.editor.container.releaseCapture(); + if (this.editor.renderer.content.releaseCapture) { + this.editor.renderer.content.releaseCapture(); } };