From 3bce27a5876be3898f40a2f254010bf7179e837a Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 6 Dec 2018 14:00:25 +0300 Subject: [PATCH] [SSE] Open context menu while loading application --- .../main/app/controller/DocumentHolder.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index 0cd967c56..f45c6be02 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -215,12 +215,6 @@ define([ if (documentHolderEl) { documentHolderEl.on({ - keydown: function(e) { - if (e.keyCode == e.F10 && e.shiftKey) { - e.stopEvent(); - me.showObjectMenu(e); - } - }, mousedown: function(e) { if (e.target.localName == 'canvas' && e.button != 2) { Common.UI.Menu.Manager.hideAll(); @@ -1433,7 +1427,7 @@ define([ } if (isimagemenu || isshapemenu || ischartmenu) { - if (!showMenu && !documentHolder.imgMenu.isVisible()) return; + if (!documentHolder.imgMenu || !showMenu && !documentHolder.imgMenu.isVisible()) return; isimagemenu = isshapemenu = ischartmenu = false; var has_chartprops = false, @@ -1500,7 +1494,7 @@ define([ if (showMenu) this.showPopupMenu(documentHolder.imgMenu, {}, event); documentHolder.mnuShapeSeparator.setVisible(documentHolder.mnuShapeAdvanced.isVisible() || documentHolder.mnuChartEdit.isVisible() || documentHolder.mnuImgAdvanced.isVisible()); } else if (istextshapemenu || istextchartmenu) { - if (!showMenu && !documentHolder.textInShapeMenu.isVisible()) return; + if (!documentHolder.textInShapeMenu || !showMenu && !documentHolder.textInShapeMenu.isVisible()) return; documentHolder.pmiTextAdvanced.textInfo = undefined; @@ -1560,7 +1554,7 @@ define([ if (showMenu) this.showPopupMenu(documentHolder.textInShapeMenu, {}, event); } else if (!this.permissions.isEditMailMerge && !this.permissions.isEditDiagram || (seltype !== Asc.c_oAscSelectionType.RangeImage && seltype !== Asc.c_oAscSelectionType.RangeShape && seltype !== Asc.c_oAscSelectionType.RangeChart && seltype !== Asc.c_oAscSelectionType.RangeChartText && seltype !== Asc.c_oAscSelectionType.RangeShapeText)) { - if (!showMenu && !documentHolder.ssMenu.isVisible()) return; + if (!documentHolder.ssMenu || !showMenu && !documentHolder.ssMenu.isVisible()) return; var iscelledit = this.api.isCellEdited, formatTableInfo = cellinfo.asc_getFormatTableInfo(),