diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index e4b1b96e8..3c07873b0 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -161,7 +161,8 @@ define([ }, 'cells:range': function(status){ me.onCellsRange(status); - } + }, + 'tabs:dragend': _.bind(me.onDragEndMouseUp, me) }); Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me)); @@ -1525,6 +1526,10 @@ define([ (data.type == 'mouseup') && (this.mouse.isLeftButtonDown = false); }, + onDragEndMouseUp: function() { + this.mouse.isLeftButtonDown = false; + }, + onDocumentMouseMove: function(e) { if (e.target.localName !== 'canvas') { this.hideHyperlinkTip(); diff --git a/apps/spreadsheeteditor/main/app/view/Statusbar.js b/apps/spreadsheeteditor/main/app/view/Statusbar.js index 02c814700..d1f7cb34c 100644 --- a/apps/spreadsheeteditor/main/app/view/Statusbar.js +++ b/apps/spreadsheeteditor/main/app/view/Statusbar.js @@ -243,6 +243,7 @@ define([ var key = _.findWhere(arrData, {type: 'key'}).value; if (Common.Utils.InternalSettings.get("sse-doc-info-key") === key) { this.api.asc_moveWorksheet(index, _.findWhere(arrData, {type: 'indexes'}).value); + Common.NotificationCenter.trigger('tabs:dragend', this); } else { var names = [], wc = this.api.asc_getWorksheetsCount(); while (wc--) { @@ -284,6 +285,7 @@ define([ } } this.dropTabs = undefined; + Common.NotificationCenter.trigger('tabs:dragend', this); }, this) });