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