Merge pull request #760 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2021-03-28 02:11:04 +03:00 committed by GitHub
commit a0c9ac8ede
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 11 deletions

View file

@ -196,11 +196,12 @@ define([
if (me.api) {
var imgsize = me.api.get_OriginalSizeImage(),
properties = new Asc.asc_CImgProperty();
properties.put_Width(imgsize.get_ImageWidth());
properties.put_Height(imgsize.get_ImageHeight());
properties.put_ResetCrop(true);
me.api.ImgApply(properties);
if (imgsize) {
properties.put_Width(imgsize.get_ImageWidth());
properties.put_Height(imgsize.get_ImageHeight());
properties.put_ResetCrop(true);
me.api.ImgApply(properties);
}
}
},

View file

@ -1660,7 +1660,7 @@ define([
},
onDocumentMouseMove: function(e) {
if (e.target.localName !== 'canvas') {
if (e && e.target.localName !== 'canvas') {
this.hideHyperlinkTip();
}
},

View file

@ -82,7 +82,7 @@ define([
focus: function() {
var me = this;
_.defer(function(){
me.cmpEl.focus();
me.cmpEl && me.cmpEl.focus();
}, 50);
},

View file

@ -415,8 +415,8 @@ define([
models[index].set({
pivotIndex: pivotIndex,
index : index,
value : name,
tip : (name.length>10) ? name : ''
value : name || '',
tip : (name && name.length>10) ? name : ''
});
} else
arr.push(new Common.UI.DataViewModel({
@ -424,8 +424,8 @@ define([
allowSelected : false,
pivotIndex : pivotIndex,
index : index,
value : name,
tip : (name.length>10) ? name : ''
value : name || '',
tip : (name && name.length>10) ? name : ''
}));
isChecked[getNameFunction ? name : me._state.names[pivotIndex]] = true;
});