From 8784ba87f695cd940ba8e98b775a0a8cafaa0ac8 Mon Sep 17 00:00:00 2001 From: Darren Date: Thu, 13 Sep 2012 18:20:06 +0100 Subject: [PATCH] Cross-browser global keyboard focus --- client_backbone/dev/view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client_backbone/dev/view.js b/client_backbone/dev/view.js index 0edc446..1e7d301 100644 --- a/client_backbone/dev/view.js +++ b/client_backbone/dev/view.js @@ -599,7 +599,7 @@ kiwi.view.Application = Backbone.View.extend({ this.doLayout(); - $(window).keydown(this.setKeyFocus); + $(document).keydown(this.setKeyFocus); }, @@ -611,7 +611,7 @@ kiwi.view.Application = Backbone.View.extend({ } // If we're typing into an input box somewhere, ignore - if (ev.srcElement.tagName.toLowerCase() === 'input') { + if (ev.target.tagName.toLowerCase() === 'input') { return; } -- 2.25.1