         @terminal.focus()
 
         $(@terminal.element).addClass('webapp-console-focus').removeClass('webapp-console-blur')
-        setTimeout((()=>delete @_focusing), 0)   # critical!
+        setTimeout((()=>delete @_focusing), 5)   # critical!
 
     set_title: (title) ->
         @opts.set_title?(title)

    unpause_rendering: () =>
        if not @_rendering_is_paused
            return
        @_rendering_is_paused = false
        f = () =>
            @render(@_render_buffer)


        e.on 'copy', =>
            @unpause_rendering()
            setTimeout(@focus, 5)  # must happen in next cycle or copy will not work due to loss of focus.

    _init_colors: () =>
        colors = Terminal.color_schemes[@opts.color_scheme].colors
