diff options
author | Valerio Virgillito | 2012-07-18 16:24:17 -0700 |
---|---|---|
committer | Valerio Virgillito | 2012-07-18 16:24:17 -0700 |
commit | 5ae767d4d47d0ed6846c7928ec219a70c3706639 (patch) | |
tree | 63051c2c69d436799ce2673e8496360496565c06 /js/controllers | |
parent | c1360b71e30cff1d90d7a3476ff2878821534d39 (diff) | |
parent | 6f2e455a77179f81dfd19037c078c158d3e14ee2 (diff) | |
download | ninja-5ae767d4d47d0ed6846c7928ec219a70c3706639.tar.gz |
Merge branch 'menu-fixes' of https://github.com/mencio/ninja into v0.7.1
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 |