🐛 Focus the current tab after switch from a new one – closes #1273

This commit is contained in:
Matheus Fernandes 2017-01-14 17:56:18 -02:00
parent e1a861659d
commit e5c076e82f
No known key found for this signature in database
GPG key ID: DD07CA4EA7B65C4F

View file

@ -394,6 +394,12 @@ hterm.Screen.prototype.syncSelectionCaret = function () {
s.addRange(r);
};
const oldScrollPortFocus = hterm.ScrollPort.prototype.focus;
hterm.ScrollPort.prototype.focus = function () {
oldScrollPortFocus();
this.terminal.focusHyperCaret();
};
// fixes a bug in hterm, where the cursor goes back to `BLOCK`
// after the bell rings
const oldRingBell = hterm.Terminal.prototype.ringBell;