Browse Source

spreadjs右键菜单调整

maixinrong 5 years ago
parent
commit
5783414c6e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      app/public/js/spreadjs_rela/spreadjs_zh.js

+ 1 - 0
app/public/js/spreadjs_rela/spreadjs_zh.js

@@ -215,6 +215,7 @@ const SpreadJsObj = {
      */
      */
     safeRightClickSelection: function (obj, e, spread) {
     safeRightClickSelection: function (obj, e, spread) {
         const sheet = spread.getActiveSheet();
         const sheet = spread.getActiveSheet();
+        if (sheet.isEditing()) sheet.endEdit(true);
         const selections = sheet.getSelections(), target = this.getHitTest(obj, e, sheet), range = this.getTargetSelection(sheet, target);
         const selections = sheet.getSelections(), target = this.getHitTest(obj, e, sheet), range = this.getTargetSelection(sheet, target);
         if (!this.checkTargetInSelection(selections, range)) {
         if (!this.checkTargetInSelection(selections, range)) {
             sheet.setSelection(range.row, range.col, range.rowCount, range.colCount);
             sheet.setSelection(range.row, range.col, range.rowCount, range.colCount);