Change mouse capture target container -> content

To prevent hover activity of scrollbars in Firefox
This commit is contained in:
DanyaPostfactum 2013-10-26 15:13:15 +11:00
commit 12a2464756

View file

@ -118,8 +118,8 @@ function DefaultHandlers(mouseHandler) {
editor.selection.clearSelection(); editor.selection.clearSelection();
} }
}.bind(this), 0); }.bind(this), 0);
if (editor.container.setCapture) { if (editor.renderer.content.setCapture) {
editor.container.setCapture(); editor.renderer.content.setCapture();
} }
editor.setStyle("ace_selecting"); editor.setStyle("ace_selecting");
this.setState("select"); this.setState("select");
@ -185,8 +185,8 @@ function DefaultHandlers(mouseHandler) {
this.selectByWordsEnd = this.selectByWordsEnd =
this.selectByLinesEnd = function() { this.selectByLinesEnd = function() {
this.editor.unsetStyle("ace_selecting"); this.editor.unsetStyle("ace_selecting");
if (this.editor.container.releaseCapture) { if (this.editor.renderer.content.releaseCapture) {
this.editor.container.releaseCapture(); this.editor.renderer.content.releaseCapture();
} }
}; };