feel gerat about it now

This commit is contained in:
Peter Cottle 2013-01-01 15:04:01 -08:00
parent a2c3fcabf5
commit 6e61ffda59
2 changed files with 12 additions and 0 deletions

View file

@ -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) {