Skip to content

Commit

Permalink
fixed the terminal and find widget key presses
Browse files Browse the repository at this point in the history
  • Loading branch information
ihalip committed Sep 7, 2017
1 parent ae2b0eb commit f07043b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -407,10 +407,8 @@ export class TerminalInstance implements ITerminalInstance {
}

public notifyFindWidgetFocusChanged(isFocused: boolean): void {
// In order to support escape to close the find widget when the terminal
// is focused terminalFocus needs to be true when either the terminal or
// the find widget are focused.
this._terminalFocusContextKey.set(isFocused || document.activeElement === this._xterm.textarea);
const terminalFocused = !isFocused && (document.activeElement === this._xterm.textarea || document.activeElement === this._xterm.element);
this._terminalFocusContextKey.set(terminalFocused);
}

public dispose(): void {
Expand Down

0 comments on commit f07043b

Please sign in to comment.