From 6e61ffda59be0a94b844f5f3960d5d4e4605d6dc Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Tue, 1 Jan 2013 15:04:01 -0800 Subject: [PATCH] feel gerat about it now --- build/bundle.js | 8 ++++++++ src/js/views/index.js | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/build/bundle.js b/build/bundle.js index b43a3ccf..6ca949ce 100644 --- a/build/bundle.js +++ b/build/bundle.js @@ -8741,6 +8741,8 @@ var ModalView = Backbone.View.extend({ Main.getEventBaton().stealBaton('windowFocus', this.onWindowFocus, this); Main.getEventBaton().stealBaton('documentClick', this.onDocumentClick, this); + // blur the text input field so keydown events will not be caught by our + // preventDefaulters, allowing people to still refresh and launch inspector (etc) $('#commandTextField').blur(); }, @@ -8749,6 +8751,8 @@ var ModalView = Backbone.View.extend({ Main.getEventBaton().releaseBaton('keyup', this.onKeyUp, this); Main.getEventBaton().releaseBaton('windowFocus', this.onWindowFocus, this); Main.getEventBaton().releaseBaton('documentClick', this.onDocumentClick, this); + + Main.getEventBaton().trigger('windowFocus'); }, onWindowFocus: function(e) { @@ -17732,6 +17736,8 @@ var ModalView = Backbone.View.extend({ Main.getEventBaton().stealBaton('windowFocus', this.onWindowFocus, this); Main.getEventBaton().stealBaton('documentClick', this.onDocumentClick, this); + // blur the text input field so keydown events will not be caught by our + // preventDefaulters, allowing people to still refresh and launch inspector (etc) $('#commandTextField').blur(); }, @@ -17740,6 +17746,8 @@ var ModalView = Backbone.View.extend({ Main.getEventBaton().releaseBaton('keyup', this.onKeyUp, this); Main.getEventBaton().releaseBaton('windowFocus', this.onWindowFocus, this); Main.getEventBaton().releaseBaton('documentClick', this.onDocumentClick, this); + + Main.getEventBaton().trigger('windowFocus'); }, onWindowFocus: function(e) { diff --git a/src/js/views/index.js b/src/js/views/index.js index baf7d1f9..d274da3c 100644 --- a/src/js/views/index.js +++ b/src/js/views/index.js @@ -129,6 +129,8 @@ var ModalView = Backbone.View.extend({ Main.getEventBaton().stealBaton('windowFocus', this.onWindowFocus, this); Main.getEventBaton().stealBaton('documentClick', this.onDocumentClick, this); + // blur the text input field so keydown events will not be caught by our + // preventDefaulters, allowing people to still refresh and launch inspector (etc) $('#commandTextField').blur(); }, @@ -137,6 +139,8 @@ var ModalView = Backbone.View.extend({ Main.getEventBaton().releaseBaton('keyup', this.onKeyUp, this); Main.getEventBaton().releaseBaton('windowFocus', this.onWindowFocus, this); Main.getEventBaton().releaseBaton('documentClick', this.onDocumentClick, this); + + Main.getEventBaton().trigger('windowFocus'); }, onWindowFocus: function(e) {