[SSE] Fix bugs from selver log (check cell info)

This commit is contained in:
Julia Radzhabova 2022-10-28 17:02:42 +03:00
parent c7a67e0431
commit df9a166c54
6 changed files with 11 additions and 8 deletions

View file

@ -153,7 +153,7 @@ define([
},
onApiSelectionChanged: function(info) {
if (this.viewmode) return; // signed file
if (this.viewmode || !info) return; // signed file
var seltype = info.asc_getSelectionType(),
coauth_disable = (!this.mode.isEditMailMerge && !this.mode.isEditDiagram && !this.mode.isEditOle) ? (info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true) : false;

View file

@ -1987,6 +1987,7 @@ define([
},
fillMenuProps: function(cellinfo, showMenu, event){
if (!cellinfo) return;
var iscellmenu, isrowmenu, iscolmenu, isallmenu, ischartmenu, isimagemenu, istextshapemenu, isshapemenu, istextchartmenu, isimageonly, isslicermenu,
documentHolder = this.documentHolder,
seltype = cellinfo.asc_getSelectionType(),
@ -2430,6 +2431,7 @@ define([
},
fillViewMenuProps: function(cellinfo, showMenu, event){
if (!cellinfo) return;
var documentHolder = this.documentHolder,
seltype = cellinfo.asc_getSelectionType(),
isCellLocked = cellinfo.asc_getLocked(),

View file

@ -669,6 +669,7 @@ define([
},
onSelectionChanged: function(info){
if (!info) return;
if (!this._isChartDataReady && info.asc_getSelectionType() == Asc.c_oAscSelectionType.RangeChart) {
this._isChartDataReady = true;
Common.Gateway.internalMessage('chartDataReady');

View file

@ -148,7 +148,7 @@ define([
},
onSelectionChanged: function(info) {
if (this.rangeSelectionMode) return;
if (this.rangeSelectionMode || !info) return;
var SelectedObjects = [],
selectType = info.asc_getSelectionType(),

View file

@ -2814,7 +2814,7 @@ define([
},
onApiSelectionChanged: function(info) {
if (!this.editMode || $('.asc-window.enable-key-events:visible').length>0) return;
if (!this.editMode || $('.asc-window.enable-key-events:visible').length>0 || !info) return;
if ( this.toolbar.mode.isEditDiagram )
return this.onApiSelectionChanged_DiagramEditor(info); else
if ( this.toolbar.mode.isEditMailMerge )
@ -3245,7 +3245,7 @@ define([
},
onApiSelectionChangedRestricted: function(info) {
if (!this.appConfig.isRestrictedEdit) return;
if (!this.appConfig.isRestrictedEdit || !info) return;
var selectionType = info.asc_getSelectionType();
this.toolbar.lockToolbar(Common.enumLock.commentLock,
@ -3256,7 +3256,7 @@ define([
},
onApiSelectionChanged_DiagramEditor: function(info) {
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection) return;
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection || !info) return;
var me = this;
var _disableEditOptions = function(seltype, coauth_disable) {
@ -3326,7 +3326,7 @@ define([
},
onApiSelectionChanged_MailMergeEditor: function(info) {
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection) return;
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection || !info) return;
var me = this;
var _disableEditOptions = function(seltype, coauth_disable) {
@ -3383,7 +3383,7 @@ define([
},
onApiSelectionChanged_OleEditor: function(info) {
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection) return;
if ( !this.editMode || this.api.isCellEdited || this.api.isRangeSelection || !info) return;
var me = this;
var _disableEditOptions = function(seltype, coauth_disable) {

View file

@ -329,7 +329,7 @@ define([
},
onApiSelectionChanged: function(info) {
if (!this.view) return;
if (!this.view || !info) return;
if ($('.asc-window.enable-key-events:visible').length>0) return;
var selectionType = info.asc_getSelectionType();