Focus on mousedown, instead of click

This commit is contained in:
Paris Kasidiaris
2017-08-02 16:03:56 +03:00
parent 49c1ca3f57
commit 72e85a352a
+3 -8
View File
@@ -746,11 +746,6 @@ Terminal.prototype.open = function(parent, focus) {
this.focus();
}
// Focus terminal when it gets clicked
on(this.element, 'click', function() {
self.focus();
});
// Listen for mouse events and translate
// them into terminal mouse protocols.
this.bindMouse();
@@ -1021,14 +1016,14 @@ Terminal.prototype.bindMouse = function() {
}
on(el, 'mousedown', function(ev) {
// ensure focus
self.focus();
if (!self.mouseEvents) return;
// send the button
sendButton(ev);
// ensure focus
self.focus();
// fix for odd bug
//if (self.vt200Mouse && !self.normalMouse) {
if (self.vt200Mouse) {