diff options
Diffstat (limited to 'js/controllers/clipboard-controller.js')
-rw-r--r-- | js/controllers/clipboard-controller.js | 23 |
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 | ||