Merge pull request #472 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova 2020-08-19 17:34:58 +03:00 committed by GitHub
commit fc6482e92e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 21 deletions

View file

@ -135,7 +135,7 @@ if (Common === undefined) {
var _onMessage = function(msg) {
// TODO: check message origin
if (msg.origin !== window.parentOrigin) return;
if (msg.origin !== window.parentOrigin && msg.origin !== window.location.origin) return;
var data = msg.data;
if (Object.prototype.toString.apply(data) !== '[object String]' || !window.JSON) {

View file

@ -62,8 +62,10 @@ define([
function onTabDblclick(e) {
var tab = $(e.currentTarget).find('> a[data-tab]').data('tab');
if ( this.dblclick_el == tab )
if ( this.dblclick_el == tab ) {
this.fireEvent('change:compact', [tab]);
this.dblclick_el = undefined;
}
}
function onShowFullviewPanel(state) {
@ -237,14 +239,19 @@ define([
var me = this;
var $target = $(e.currentTarget);
var tab = $target.find('> a[data-tab]').data('tab');
var islone = $target.hasClass('x-lone');
if ( me.isFolded ) {
if ( $target.hasClass('x-lone') ) {
me.collapse();
// me.fireEvent('')
} else
if ($target.hasClass('x-lone')) {
me.isFolded && me.collapse();
} else {
if ( $target.hasClass('active') ) {
!me._timerSetTab && me.collapse();
if (!me._timerSetTab) {
me.dblclick_el = tab;
if ( me.isFolded ) {
me.collapse();
setTimeout(function(){
me.dblclick_el = undefined;
}, 500);
}
}
} else {
me._timerSetTab = true;
setTimeout(function(){
@ -252,11 +259,13 @@ define([
}, 500);
me.setTab(tab);
me.processPanelVisible(null, true);
if ( !me.isFolded ) {
if ( me.dblclick_timer ) clearTimeout(me.dblclick_timer);
me.dblclick_timer = setTimeout(function () {
me.dblclick_el = tab;
delete me.dblclick_timer;
},500);
}
} else {
if ( !$target.hasClass('active') && !islone ) {
me.setTab(tab);
me.processPanelVisible(null, true);
}
}
},
@ -292,12 +301,6 @@ define([
$tp.addClass('active');
}
if ( me.dblclick_timer ) clearTimeout(me.dblclick_timer);
me.dblclick_timer = setTimeout(function () {
me.dblclick_el = tab;
delete me.dblclick_timer;
},300);
this.fireEvent('tab:active', [tab]);
}
},

View file

@ -772,7 +772,7 @@ define([
if ( type == Asc.c_oAscAsyncActionType.BlockInteraction &&
(!this.getApplication().getController('LeftMenu').dlgSearch || !this.getApplication().getController('LeftMenu').dlgSearch.isVisible()) &&
(!this.getApplication().getController('Toolbar').dlgSymbolTable || !this.getApplication().getController('Toolbar').dlgSymbolTable.isVisible()) &&
!((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl)) ) {
!((id == Asc.c_oAscAsyncAction['LoadDocumentFonts'] || id == Asc.c_oAscAsyncAction['ApplyChanges'] || id == Asc.c_oAscAsyncAction['DownloadAs']) && (this.dontCloseDummyComment || this.inTextareaControl || Common.Utils.ModalWindow.isVisible() || this.inFormControl)) ) {
// this.onEditComplete(this.loadMask); //если делать фокус, то при принятии чужих изменений, заканчивается свой композитный ввод
this.api.asc_enableKeyEvents(true);
}