perge pull #1662
This commit is contained in:
commit
0bebd94926
3 changed files with 9 additions and 6 deletions
|
|
@ -490,10 +490,12 @@ var TextInput = function(parentNode, host) {
|
||||||
|
|
||||||
// firefox fires contextmenu event after opening it
|
// firefox fires contextmenu event after opening it
|
||||||
if (!useragent.isGecko || useragent.isMac) {
|
if (!useragent.isGecko || useragent.isMac) {
|
||||||
event.addListener(text, "contextmenu", function(e) {
|
var onContextMenu = function(e) {
|
||||||
host.textInput.onContextMenu(e);
|
host.textInput.onContextMenu(e);
|
||||||
onContextMenuClose();
|
onContextMenuClose();
|
||||||
});
|
};
|
||||||
|
event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
|
||||||
|
event.addListener(text, "contextmenu", onContextMenu);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,8 +118,8 @@ function DefaultHandlers(mouseHandler) {
|
||||||
editor.selection.clearSelection();
|
editor.selection.clearSelection();
|
||||||
}
|
}
|
||||||
}.bind(this), 0);
|
}.bind(this), 0);
|
||||||
if (editor.renderer.content.setCapture) {
|
if (editor.renderer.scroller.setCapture) {
|
||||||
editor.renderer.content.setCapture();
|
editor.renderer.scroller.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.renderer.content.releaseCapture) {
|
if (this.editor.renderer.scroller.releaseCapture) {
|
||||||
this.editor.renderer.content.releaseCapture();
|
this.editor.renderer.scroller.releaseCapture();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ define(function(require, exports, module) {
|
||||||
|
|
||||||
var MockRenderer = exports.MockRenderer = function(visibleRowCount) {
|
var MockRenderer = exports.MockRenderer = function(visibleRowCount) {
|
||||||
this.container = document.createElement("div");
|
this.container = document.createElement("div");
|
||||||
|
this.scroller = document.createElement("div");
|
||||||
this.visibleRowCount = visibleRowCount || 20;
|
this.visibleRowCount = visibleRowCount || 20;
|
||||||
|
|
||||||
this.layerConfig = {
|
this.layerConfig = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue