do not move textarea during mouse selection
This commit is contained in:
parent
2f6a6ce7e0
commit
b5b5e1e97f
1 changed files with 6 additions and 0 deletions
|
|
@ -128,6 +128,10 @@ var MouseHandler = function(editor) {
|
||||||
this.x = ev.x;
|
this.x = ev.x;
|
||||||
this.y = ev.y;
|
this.y = ev.y;
|
||||||
|
|
||||||
|
// do not move textarea during selection
|
||||||
|
var kt = this.editor.renderer.$keepTextAreaAtCursor;
|
||||||
|
this.editor.renderer.$keepTextAreaAtCursor = false;
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
var onMouseSelection = function(e) {
|
var onMouseSelection = function(e) {
|
||||||
self.x = e.clientX;
|
self.x = e.clientX;
|
||||||
|
|
@ -138,6 +142,8 @@ var MouseHandler = function(editor) {
|
||||||
clearInterval(timerId);
|
clearInterval(timerId);
|
||||||
self[self.state + "End"] && self[self.state + "End"](e);
|
self[self.state + "End"] && self[self.state + "End"](e);
|
||||||
self.$clickSelection = null;
|
self.$clickSelection = null;
|
||||||
|
self.editor.renderer.$keepTextAreaAtCursor = kt;
|
||||||
|
self.editor.renderer.$moveTextAreaToCursor();
|
||||||
};
|
};
|
||||||
|
|
||||||
var onSelectionInterval = function() {
|
var onSelectionInterval = function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue