mirror of
https://github.com/ONLYOFFICE/sdkjs.git
synced 2026-04-07 14:09:12 +08:00
[se] Fix bug 76532
This commit is contained in:
committed by
Ilya Kirillov
parent
fce23b8c12
commit
679a6d70cc
@ -426,7 +426,7 @@ function (window, undefined) {
|
||||
|
||||
// Reset editor state
|
||||
t._setEditorState(c_oAscCellEditorState.editEnd);
|
||||
t.handlers.trigger("closed");
|
||||
t.handlers.trigger("closed", saveValue);
|
||||
t.closeAction();
|
||||
|
||||
if (callback) {
|
||||
@ -483,7 +483,7 @@ function (window, undefined) {
|
||||
|
||||
// Reset editor state
|
||||
this._setEditorState(c_oAscCellEditorState.editEnd);
|
||||
this.handlers.trigger("closed");
|
||||
this.handlers.trigger("closed", saveValue);
|
||||
t.closeAction();
|
||||
|
||||
if (callback) {
|
||||
|
||||
@ -2302,8 +2302,9 @@
|
||||
return this.closeCellEditor();
|
||||
};
|
||||
|
||||
WorkbookView.prototype._onCloseCellEditor = function() {
|
||||
WorkbookView.prototype._onCloseCellEditor = function(saveValue) {
|
||||
var isCellEditMode = this.getCellEditMode();
|
||||
var isFormulaEditMode = this.isFormulaEditMode;
|
||||
this.setCellEditMode(false);
|
||||
|
||||
if (isCellEditMode) {
|
||||
@ -2332,7 +2333,9 @@
|
||||
this.updateTargetForCollaboration();
|
||||
this.sendCursor();
|
||||
|
||||
this.externalSelectionController.sendExternalCloseEditor();
|
||||
if (isFormulaEditMode) {
|
||||
this.externalSelectionController.sendExternalCloseEditor(saveValue);
|
||||
}
|
||||
};
|
||||
|
||||
WorkbookView.prototype._onEmpty = function() {
|
||||
@ -7613,7 +7616,7 @@
|
||||
});
|
||||
|
||||
window.addEventListener && window.addEventListener('unload', function() {
|
||||
if (isClosing) {
|
||||
if (isClosing && oThis.wb.isFormulaEditMode) {
|
||||
oThis.sendExternalCloseEditor();
|
||||
}
|
||||
});
|
||||
@ -7672,6 +7675,10 @@
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.wb.isFormulaEditMode && !this.getExternalFormulaEditMode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.lockSendChangeSelection = true;
|
||||
if ((!this.getExternalFormulaEditMode() && !this._isEqualEditorState(data)) || !this.supportVisibilityChangeOption) {
|
||||
this.wb.setFormulaEditMode(true);
|
||||
@ -7697,10 +7704,16 @@
|
||||
return;
|
||||
}
|
||||
const isExternalFormulaEditMode = this.getExternalFormulaEditMode();
|
||||
|
||||
if (!data.isClose && this.wb.isCellEditMode) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setExternalFormulaEditMode(!data.isClose ? {id: data.id} : null);
|
||||
|
||||
if (this.wb.getCellEditMode() && data.isClose && (isExternalFormulaEditMode || !this.supportVisibilityChangeOption)) {
|
||||
this.wb.closeCellEditor(!data.saveValue);
|
||||
if (this.wb.getCellEditMode() && data.isClose && (isExternalFormulaEditMode || this.wb.isFormulaEditMode)) {
|
||||
var cancelClose = isExternalFormulaEditMode ? true : !data.saveValue;
|
||||
this.wb.closeCellEditor(cancelClose);
|
||||
this.clean();
|
||||
} else if (!this.supportVisibilityChangeOption && !this.wb.getCellEditMode() && !data.isClose) {
|
||||
this.onOpenCellEditor();
|
||||
|
||||
Reference in New Issue
Block a user