paste the linux way :)copy seems to be impossible:(

This commit is contained in:
nightwing 2012-05-01 17:53:28 +04:00
commit 16fb6c90cc

View file

@ -41,7 +41,6 @@
define(function(require, exports, module) {
"use strict";
var event = require("../lib/event");
var dom = require("../lib/dom");
var BrowserFocus = require("../lib/browser_focus").BrowserFocus;
@ -91,10 +90,15 @@ function DefaultHandlers(mouseHandler) {
editor.moveCursorToPosition(pos);
editor.selection.clearSelection();
}
if (button == 2) {
editor.textInput.onContextMenu({x: ev.clientX, y: ev.clientY}, selectionEmpty);
event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose);
}
// 2: contextmenu, 1: linux paste
this.moveTextarea = function() {
editor.textInput.onContextMenu({x: _self.x, y: _self.y});
};
this.moveTextareaEnd = editor.textInput.onContextMenuClose;
editor.textInput.onContextMenu({x: this.x, y: this.y}, selectionEmpty);
this.captureMouse(ev, "moveTextarea");
return;
}