Merge pull request #1274 from ONLYOFFICE/fix/drag-and-drop

Fix/drag and drop
This commit is contained in:
Julia Radzhabova 2021-10-26 18:44:10 +03:00 committed by GitHub
commit e743fb7412
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,9 +177,14 @@ define([
lockDrag = true;
}
});
if (this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1 || this.bar.isEditFormula) {
if (((this.bar.selectTabs.length === this.bar.tabs.length || this.bar.tabs.length === 1) && !(e.ctrlKey || e.metaKey)) || this.bar.isEditFormula) {
lockDrag = true;
}
// move last selected sheet if all sheets are selected
if (this.bar.selectTabs.length === this.bar.tabs.length && this.bar.tabs.length > 1 && !e.ctrlKey && !e.metaKey) {
lockDrag = false;
this.bar.$el.find('ul > li.selected').removeClass('selected');
}
this.bar.$el.find('ul > li > span').attr('draggable', !lockDrag);
if (!lockDrag && !e.ctrlKey && !e.metaKey) {
tab.changeState();