fix #956 Double tap on trackpad doesn't select word

This commit is contained in:
nightwing 2013-03-05 00:17:56 +04:00
commit dbab5f9210

View file

@ -113,6 +113,7 @@ var MouseHandler = function(editor) {
var onCaptureEnd = function(e) { var onCaptureEnd = function(e) {
clearInterval(timerId); clearInterval(timerId);
onCaptureInterval();
self[self.state + "End"] && self[self.state + "End"](e); self[self.state + "End"] && self[self.state + "End"](e);
self.$clickSelection = null; self.$clickSelection = null;
if (renderer.$keepTextAreaAtCursor == null) { if (renderer.$keepTextAreaAtCursor == null) {
@ -124,14 +125,10 @@ var MouseHandler = function(editor) {
var onCaptureInterval = function() { var onCaptureInterval = function() {
self[self.state] && self[self.state](); self[self.state] && self[self.state]();
} };
if (useragent.isOldIE && ev.domEvent.type == "dblclick") { if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
setTimeout(function() { return setTimeout(function() {onCaptureEnd(ev.domEvent);});
onCaptureInterval();
onCaptureEnd(ev.domEvent);
});
return;
} }
event.capture(this.editor.container, onMouseMove, onCaptureEnd); event.capture(this.editor.container, onMouseMove, onCaptureEnd);