From 819348eaf3ff6b4a8c38ecca7c18f6dacac7f03b Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Jul 2012 15:08:37 -0700 Subject: Fixed some issues with the menu-fixes - Fixed the dark background on file open - Fixed the copy/paste/cut menu not working. Signed-off-by: Valerio Virgillito --- js/controllers/clipboard-controller.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'js/controllers') diff --git a/js/controllers/clipboard-controller.js b/js/controllers/clipboard-controller.js index d2173e31..afc94c8c 100644 --- a/js/controllers/clipboard-controller.js +++ b/js/controllers/clipboard-controller.js @@ -80,9 +80,11 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component return; }//for design view only - // Don't do anything if an input or other control is focused + // Don't do anything if an input or other control is focused except the copy menu button if(document.activeElement.nodeName !== "BODY") { - return; + if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { + return; + } } if(this.clipboardContext === "stage"){ @@ -99,7 +101,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component // Don't do anything if an input or other control is focused if(document.activeElement.nodeName !== "BODY") { - return; + if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { + return; + } } if(this.clipboardContext === "stage"){ @@ -123,7 +127,9 @@ var ClipboardController = exports.ClipboardController = Montage.create(Component // Don't do anything if an input or other control is focused if(document.activeElement.nodeName !== "BODY") { - return; + if(!document.activeElement.getAttribute("data-montage-id") === "menuItemButton") { + return; + } } //TODO: return if stage is not focussed -- cgit v1.2.3