[SSE] Allow draggable when ctrl is pressed
This commit is contained in:
parent
6d4ed35b3d
commit
2dd3d0a95b
|
@ -170,7 +170,7 @@ define([
|
||||||
this.trigger('tab:contextmenu', this, this.tabs.indexOf(tab), tab, this.selectTabs);
|
this.trigger('tab:contextmenu', this, this.tabs.indexOf(tab), tab, this.selectTabs);
|
||||||
}, this.bar),
|
}, this.bar),
|
||||||
mousedown: $.proxy(function (e) {
|
mousedown: $.proxy(function (e) {
|
||||||
if ((3 !== e.which) && !e.ctrlKey && !e.metaKey && !e.shiftKey) {
|
if ((3 !== e.which) && !e.shiftKey) {
|
||||||
var lockDrag = tab.isLockTheDrag;
|
var lockDrag = tab.isLockTheDrag;
|
||||||
this.bar.selectTabs.forEach(function (item) {
|
this.bar.selectTabs.forEach(function (item) {
|
||||||
if (item.isLockTheDrag) {
|
if (item.isLockTheDrag) {
|
||||||
|
@ -181,8 +181,9 @@ define([
|
||||||
lockDrag = true;
|
lockDrag = true;
|
||||||
}
|
}
|
||||||
this.bar.$el.find('ul > li > span').attr('draggable', !lockDrag);
|
this.bar.$el.find('ul > li > span').attr('draggable', !lockDrag);
|
||||||
if (!lockDrag)
|
if (!lockDrag && !e.ctrlKey && !e.metaKey) {
|
||||||
tab.changeState();
|
tab.changeState();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.bar.$el.find('ul > li > span').attr('draggable', 'false');
|
this.bar.$el.find('ul > li > span').attr('draggable', 'false');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue