aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-18 15:08:37 -0700
committerValerio Virgillito2012-07-18 15:08:37 -0700
commit819348eaf3ff6b4a8c38ecca7c18f6dacac7f03b (patch)
tree2d16f0fc70e5f65986accef736583c59fe39a08a /js/controllers
parent2f009ea40ca815a9aff27a5862bba5a6b335586c (diff)
downloadninja-819348eaf3ff6b4a8c38ecca7c18f6dacac7f03b.tar.gz
Fixed some issues with the menu-fixes
- Fixed the dark background on file open - Fixed the copy/paste/cut menu not working. Signed-off-by: Valerio Virgillito <valerio@motorola.com>
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/clipboard-controller.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js
index d2173e31..afc94c8c 100644
--- a/js/controllers/clipboard-controller.js
+++ b/js/controllers/clipboard-controller.js
@@ -80,9 +80,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
80 return; 80 return;
81 }//for design view only 81 }//for design view only
82 82
83 // Don't do anything if an input or other control is focused 83 // Don't do anything if an input or other control is focused except the copy menu button
84 if(document.activeElement.nodeName !== "BODY") { 84 if(document.activeElement.nodeName !== "BODY") {
85 return; 85 if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") {
86 return;
87 }
86 } 88 }
87 89
88 if(this.clipboardContext === "stage"){ 90 if(this.clipboardContext === "stage"){
@@ -99,7 +101,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
99 101
100 // Don't do anything if an input or other control is focused 102 // Don't do anything if an input or other control is focused
101 if(document.activeElement.nodeName !== "BODY") { 103 if(document.activeElement.nodeName !== "BODY") {
102 return; 104 if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") {
105 return;
106 }
103 } 107 }
104 108
105 if(this.clipboardContext === "stage"){ 109 if(this.clipboardContext === "stage"){
@@ -123,7 +127,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
123 127
124 // Don't do anything if an input or other control is focused 128 // Don't do anything if an input or other control is focused
125 if(document.activeElement.nodeName !== "BODY") { 129 if(document.activeElement.nodeName !== "BODY") {
126 return; 130 if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") {
131 return;
132 }
127 } 133 }
128 134
129 //TODO: return if stage is not focussed 135 //TODO: return if stage is not focussed