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