diff --git a/lib/view.coffee b/lib/view.coffee index 7f1cb03..2208b6e 100644 --- a/lib/view.coffee +++ b/lib/view.coffee @@ -468,6 +468,8 @@ class PlatformIOTerminalView extends View return unless @terminal lastActiveElement = $(document.activeElement) + if !(lastActiveElement.is('div.terminal')) + return @terminal.focus() if @terminal._textarea