Skip to content

Commit

Permalink
Merge pull request '[se] Fix bug 72059' (#667) from fix/bug-72059 int…
Browse files Browse the repository at this point in the history
  • Loading branch information
K0R0L committed Feb 13, 2025
2 parents 3228aa0 + f4c8059 commit 44cc444
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cell/view/WorksheetView.js
Original file line number Diff line number Diff line change
Expand Up @@ -18622,6 +18622,19 @@
WorksheetView.prototype.openCellEditor = function (editor, enterOptions, selectionRange) {
var t = this, col, row, c, fl, mc, bg, isMerged;

let wsModel = this.model;
//todo after remove check native
if (window['IS_NATIVE_EDITOR'] && wsModel.getSheetProtection(Asc.c_oAscSheetProtectType.selectLockedCells) &&
wsModel.getSheetProtection(Asc.c_oAscSheetProtectType.selectUnlockedCells)) {
wsModel.workbook.handlers.trigger("asc_onError", c_oAscError.ID.ChangeOnProtectedSheet, c_oAscError.Level.NoCritical);
return;
}
let activeCell = selectionRange && selectionRange.activeCell ? selectionRange.activeCell : wsModel.selectionRange.activeCell;
if (window['IS_NATIVE_EDITOR'] && activeCell && wsModel.getSheetProtection() && wsModel.isLockedRange(new Asc.Range(activeCell.col, activeCell.row, activeCell.col, activeCell.row))) {
wsModel.workbook.handlers.trigger("asc_onError", c_oAscError.ID.ChangeOnProtectedSheet, c_oAscError.Level.NoCritical);
return;
}

if (selectionRange) {
this.model.selectionRange = selectionRange;
}
Expand Down

0 comments on commit 44cc444

Please sign in to comment.