Fix Bug 36264. Refactoring mouseup event outside of the browser window.
This commit is contained in:
parent
6463500ad3
commit
c421ea70f5
|
@ -168,11 +168,11 @@ define([
|
|||
this.splitters.push({resizer:resizer});
|
||||
|
||||
panel.resize.hidden && resizer.el.hide();
|
||||
Common.Gateway.on('processmouse', this.resize.eventStop);
|
||||
}
|
||||
}, this);
|
||||
|
||||
this.freeze = options.freeze; this.freeze && this.freezePanels(this.freeze);
|
||||
Common.Gateway.on('processmouse', this.resize.eventStop);
|
||||
},
|
||||
|
||||
doLayout: function() {
|
||||
|
|
|
@ -207,7 +207,7 @@ define([
|
|||
function dragComplete() {
|
||||
if (!_.isUndefined(me.drag)) {
|
||||
me.drag.tab.$el.css('z-index', '');
|
||||
|
||||
me.bar.dragging = false;
|
||||
var tab = null;
|
||||
for (var i = me.bar.tabs.length - 1; i >= 0; --i) {
|
||||
tab = me.bar.tabs[i].$el;
|
||||
|
@ -254,6 +254,7 @@ define([
|
|||
_clientX = e.clientX*Common.Utils.zoom();
|
||||
me.bar = bar;
|
||||
me.drag = {tab: tab, index: index};
|
||||
bar.dragging = true;
|
||||
|
||||
this.calculateBounds();
|
||||
this.setAbsTabs();
|
||||
|
@ -365,7 +366,7 @@ define([
|
|||
},
|
||||
|
||||
onProcessMouse: function(data) {
|
||||
if (data.type == 'mouseup') {
|
||||
if (data.type == 'mouseup' && this.dragging) {
|
||||
var tab = this.getActive(true);
|
||||
if (tab)
|
||||
tab.mouseup();
|
||||
|
|
|
@ -294,6 +294,13 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
function _onProcessMouse(data) {
|
||||
if (data.type == 'mouseup' && this.dragging.enabled) {
|
||||
_mouseup.call(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* window resize functions */
|
||||
function _resizestart(event) {
|
||||
Common.UI.Menu.Manager.hideAll();
|
||||
|
@ -580,6 +587,9 @@ define([
|
|||
};
|
||||
this.$window.find('.header').on('mousedown', this.binding.dragStart);
|
||||
this.$window.find('.tool.close').on('click', _.bind(doclose, this));
|
||||
|
||||
if (!this.initConfig.modal)
|
||||
Common.Gateway.on('processmouse', _.bind(_onProcessMouse, this));
|
||||
} else {
|
||||
this.$window.find('.body').css({
|
||||
top:0,
|
||||
|
|
Loading…
Reference in a new issue