mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 13:18:40 -09:00
Prevent xterm to emit focus event twice
This commit is contained in:
parent
f8c19b0ef2
commit
46173019cd
1 changed files with 6 additions and 1 deletions
|
|
@ -55,7 +55,12 @@ export default class Term extends PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.onActive) {
|
if (props.onActive) {
|
||||||
this.term.on('focus', props.onActive);
|
this.term.on('focus', () => {
|
||||||
|
// xterm@2 emits this event 2 times. Will be fixed in xterm@3.
|
||||||
|
if (!this.props.isTermActive) {
|
||||||
|
props.onActive();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.onData) {
|
if (props.onData) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue