Merge pull request #98 from ONLYOFFICE/feature/bugfix5.1.3

[PE] Fix Bug 37543 (bug in arrays concatenation)
This commit is contained in:
Alexey Golubev 2018-04-23 14:17:35 +03:00 committed by GitHub
commit 0755995c28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -164,11 +164,14 @@ define([
var result = Array.prototype.slice.call(this);
args.forEach(function(sub){
Array.prototype.push.apply(result, sub);
if (sub instanceof Array )
Array.prototype.push.apply(result, sub);
else
result.push(sub);
});
return result;
}
};
var _out_array = Object.create(ButtonsArray.prototype);
for ( var i in arguments ) {

View file

@ -1963,7 +1963,7 @@ define([
var toolbar = this.toolbar;
toolbar.$el.find('.toolbar').toggleClass('masked', disable);
this.toolbar.lockToolbar(PE.enumLock.menuFileOpen, disable, {array: [toolbar.btnsAddSlide, toolbar.btnChangeSlide, toolbar.btnPreview, toolbar.btnHide]});
this.toolbar.lockToolbar(PE.enumLock.menuFileOpen, disable, {array: toolbar.btnsAddSlide.concat(toolbar.btnChangeSlide, toolbar.btnPreview, toolbar.btnHide)});
if(disable) {
mask = $("<div class='toolbar-mask'>").appendTo(toolbar.$el.find('.toolbar'));
Common.util.Shortcuts.suspendEvents('command+k, ctrl+k, alt+h, command+f5, ctrl+f5');