fix #1751 sticky selection on in IE11
This commit is contained in:
parent
09d6741a02
commit
6e14e92912
2 changed files with 9 additions and 6 deletions
|
|
@ -180,9 +180,12 @@ exports.addMultiMouseDownListener = function(el, timeouts, eventHandler, callbac
|
||||||
}
|
}
|
||||||
if (useragent.isIE) {
|
if (useragent.isIE) {
|
||||||
var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
|
var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
|
||||||
if (isNewClick) {
|
if (!timer || isNewClick)
|
||||||
clicks = 1;
|
clicks = 1;
|
||||||
}
|
if (timer)
|
||||||
|
clearTimeout(timer)
|
||||||
|
timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
|
||||||
|
|
||||||
if (clicks == 1) {
|
if (clicks == 1) {
|
||||||
startX = e.clientX;
|
startX = e.clientX;
|
||||||
startY = e.clientY;
|
startY = e.clientY;
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,10 @@ var MouseHandler = function(editor) {
|
||||||
var mouseTarget = editor.renderer.getMouseEventTarget();
|
var mouseTarget = editor.renderer.getMouseEventTarget();
|
||||||
event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
|
event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
|
||||||
event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
|
event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
|
||||||
event.addMultiMouseDownListener(mouseTarget, [300, 300, 250], this, "onMouseEvent");
|
event.addMultiMouseDownListener(mouseTarget, [400, 300, 250], this, "onMouseEvent");
|
||||||
if (editor.renderer.scrollBarV) {
|
if (editor.renderer.scrollBarV) {
|
||||||
event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [300, 300, 250], this, "onMouseEvent");
|
event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [400, 300, 250], this, "onMouseEvent");
|
||||||
event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [300, 300, 250], this, "onMouseEvent");
|
event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [400, 300, 250], this, "onMouseEvent");
|
||||||
}
|
}
|
||||||
event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
|
event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue