aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorKruti Shah2012-07-19 10:08:07 -0700
committerKruti Shah2012-07-19 10:08:07 -0700
commit5741fbc0a2eb1a43017b76406056bc98cdf00297 (patch)
treec6b478666eab9e637039467d70e948e1e0e46882 /js/controllers
parent0b899ad6cec5e4626dfa32230be7c04d22d4f820 (diff)
parent142dc59794769ad783ab050b27b4f56ac5773afb (diff)
downloadninja-5741fbc0a2eb1a43017b76406056bc98cdf00297.tar.gz
Merge branch 'refs/heads/TimelineUberJD' into Timeline-local-kruti
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/clipboard-controller.js23
1 files changed, 22 insertions, 1 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js
index d2173e31..c3543c95 100644
--- a/js/controllers/clipboard-controller.js
+++ b/js/controllers/clipboard-controller.js
@@ -80,8 +80,15 @@ 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 if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") {
86 return;
87 }
88 }
89
90 //perform clipboard operations only if selection tool is selected
91 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
85 return; 92 return;
86 } 93 }
87 94
@@ -99,6 +106,13 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
99 106
100 // Don't do anything if an input or other control is focused 107 // Don't do anything if an input or other control is focused
101 if(document.activeElement.nodeName !== "BODY") { 108 if(document.activeElement.nodeName !== "BODY") {
109 if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") {
110 return;
111 }
112 }
113
114 //perform clipboard operations only if selection tool is selected
115 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
102 return; 116 return;
103 } 117 }
104 118
@@ -123,6 +137,13 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component
123 137
124 // Don't do anything if an input or other control is focused 138 // Don't do anything if an input or other control is focused
125 if(document.activeElement.nodeName !== "BODY") { 139 if(document.activeElement.nodeName !== "BODY") {
140 if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") {
141 return;
142 }
143 }
144
145 //perform clipboard operations only if selection tool is selected
146 if(this.application.ninja.toolsData.defaultToolsData[this.application.ninja.toolsData.selectionToolIndex].selected === false){
126 return; 147 return;
127 } 148 }
128 149