fix multiselect mouse interaction issues

This commit is contained in:
nightwing 2013-12-29 20:05:23 +04:00
commit 90b2a6cd77
2 changed files with 6 additions and 2 deletions

View file

@ -384,6 +384,8 @@ function DragdropHandler(mouseHandler) {
var button = e.getButton();
var clickCount = e.domEvent.detail || 1;
if (clickCount === 1 && button === 0 && inSelection) {
if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))
return;
this.mousedownEvent.time = Date.now();
var eventTarget = e.domEvent.target || e.domEvent.srcElement;
if ("unselectable" in eventTarget)
@ -391,7 +393,7 @@ function DragdropHandler(mouseHandler) {
if (editor.getDragDelay()) {
// https://code.google.com/p/chromium/issues/detail?id=286700
if (useragent.isWebKit) {
self.cancelDrag = true;
this.cancelDrag = true;
var mouseTarget = editor.container;
mouseTarget.draggable = true;
}

View file

@ -105,7 +105,8 @@ function onMouseDown(e) {
}
var oldRange = selection.rangeList.rangeAtPoint(pos);
editor.$blockScrolling++;
editor.once("mouseup", function() {
var tmpSel = selection.toOrientedRange();
@ -118,6 +119,7 @@ function onMouseDown(e) {
}
selection.addRange(tmpSel);
}
editor.$blockScrolling--;
});
} else if (alt && button == 0) {