From bf8a79b0ed1593b5b9e3085373dcdab9aeab055e Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 24 May 2012 10:46:28 -0700 Subject: Keyboard arrows were not working because some code had not been updated to check updated document model. Signed-off-by: Nivesh Rajbhandari --- js/mediators/keyboard-mediator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/mediators/keyboard-mediator.js b/js/mediators/keyboard-mediator.js index 2f55edb4..e2e8e937 100755 --- a/js/mediators/keyboard-mediator.js +++ b/js/mediators/keyboard-mediator.js @@ -88,7 +88,7 @@ exports.KeyboardMediator = Montage.create(Component, { //keyboard controls for html design view // TODO - New template mode doesn't set currentView yet. - if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.model.currentView === "design")){ + if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.currentView === "design")) { // Don't do anything if an input or other control is focused if(document.activeElement.nodeName !== "BODY") { @@ -252,7 +252,7 @@ exports.KeyboardMediator = Montage.create(Component, { handleKeyup: { value: function(evt) { //keyboard controls for html design view - if((!!this.application.ninja.currentDocument)){// && (this.application.ninja.currentDocument.model.currentView === "design")){ + if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.currentView === "design")) { if(document.activeElement.nodeName !== "BODY") { // Don't do anything if an input or other control is focused return; -- cgit v1.2.3