Added lost focus event handler for the console.