diff options
author | Valerio Virgillito | 2012-07-18 16:24:45 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-18 16:24:45 -0700 |
commit | f79f7c540d8533eed8fc562b809e15dcfea94438 (patch) | |
tree | 955b0d51fb163fb0a5165a6e16bf503de4cda712 /js/controllers | |
parent | 71650434d5b78c2b86dc8a689d0c9034d418f38b (diff) | |
parent | 6f2e455a77179f81dfd19037c078c158d3e14ee2 (diff) | |
download | ninja-f79f7c540d8533eed8fc562b809e15dcfea94438.tar.gz |
Merge branch 'menu-fixes' of https://github.com/mencio/ninja
Diffstat (limited to 'js/controllers')
-rw-r--r-- | js/controllers/clipboard-controller.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js index 50538477..c3543c95 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 | //perform clipboard operations only if selection tool is selected | 90 | //perform clipboard operations only if selection tool is selected |
@@ -104,7 +106,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
104 | 106 | ||
105 | // 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 |
106 | if(document.activeElement.nodeName !== "BODY") { | 108 | if(document.activeElement.nodeName !== "BODY") { |
107 | return; | 109 | if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { |
110 | return; | ||
111 | } | ||
108 | } | 112 | } |
109 | 113 | ||
110 | //perform clipboard operations only if selection tool is selected | 114 | //perform clipboard operations only if selection tool is selected |
@@ -133,7 +137,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component | |||
133 | 137 | ||
134 | // 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 |
135 | if(document.activeElement.nodeName !== "BODY") { | 139 | if(document.activeElement.nodeName !== "BODY") { |
136 | return; | 140 | if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { |
141 | return; | ||
142 | } | ||
137 | } | 143 | } |
138 | 144 | ||
139 | //perform clipboard operations only if selection tool is selected | 145 | //perform clipboard operations only if selection tool is selected |