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