diff options
author | Jose Antonio Marquez | 2012-07-18 16:39:00 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-07-18 16:39:00 -0700 |
commit | aaf19014186e881078148394c107278b8b3b28f6 (patch) | |
tree | 18700f39c8da54b92854c60e5e05ddb86443a6c9 /js/controllers | |
parent | c491c29807d06395f2324adfe4b2f15a32398241 (diff) | |
parent | f79f7c540d8533eed8fc562b809e15dcfea94438 (diff) | |
download | ninja-aaf19014186e881078148394c107278b8b3b28f6.tar.gz |
Merge branch 'refs/heads/Ninja-Master' into Document
Diffstat (limited to 'js/controllers')
-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 | ||