aboutsummaryrefslogtreecommitdiff
path: root/js/mediators
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-05-24 10:46:28 -0700
committerNivesh Rajbhandari2012-05-24 10:46:28 -0700
commitbf8a79b0ed1593b5b9e3085373dcdab9aeab055e (patch)
tree64100b5f77d96b180f776a25230d8d2e0b82814e /js/mediators
parent8fdf7567a7967208f554657c6c6d5665ab55e118 (diff)
downloadninja-bf8a79b0ed1593b5b9e3085373dcdab9aeab055e.tar.gz
Keyboard arrows were not working because some code had not been updated to check updated document model.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/mediators')
-rwxr-xr-xjs/mediators/keyboard-mediator.js4
1 files 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, {
88 88
89 //keyboard controls for html design view 89 //keyboard controls for html design view
90 // TODO - New template mode doesn't set currentView yet. 90 // TODO - New template mode doesn't set currentView yet.
91 if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.model.currentView === "design")){ 91 if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.currentView === "design")) {
92 92
93 // Don't do anything if an input or other control is focused 93 // Don't do anything if an input or other control is focused
94 if(document.activeElement.nodeName !== "BODY") { 94 if(document.activeElement.nodeName !== "BODY") {
@@ -252,7 +252,7 @@ exports.KeyboardMediator = Montage.create(Component, {
252 handleKeyup: { 252 handleKeyup: {
253 value: function(evt) { 253 value: function(evt) {
254 //keyboard controls for html design view 254 //keyboard controls for html design view
255 if((!!this.application.ninja.currentDocument)){// && (this.application.ninja.currentDocument.model.currentView === "design")){ 255 if((!!this.application.ninja.currentDocument) && (this.application.ninja.currentDocument.currentView === "design")) {
256 if(document.activeElement.nodeName !== "BODY") { 256 if(document.activeElement.nodeName !== "BODY") {
257 // Don't do anything if an input or other control is focused 257 // Don't do anything if an input or other control is focused
258 return; 258 return;