focus the terminal when it is touched (#129128)

This commit is contained in:
Megan Rogge 2021-07-21 15:35:44 -05:00 committed by GitHub
parent ffae23b5f1
commit 2b2924d1fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -807,6 +807,9 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
listener.dispose();
});
}));
this._register(dom.addDisposableListener(xterm.element, 'touchstart', () => {
xterm.focus();
}));
// xterm.js currently drops selection on keyup as we need to handle this case.
this._register(dom.addDisposableListener(xterm.element, 'keyup', () => {