diff --git a/assets/js/layout.js b/assets/js/layout.js index 7ae8405d..100d07fd 100644 --- a/assets/js/layout.js +++ b/assets/js/layout.js @@ -94,11 +94,6 @@ setTimeout(function () { terminal.focus(); }, 100); - - if (!container.dropControlProceeded) { - container.dropControlProceeded = true; - self._controlDrop(container); - } }); container.on('resize', function () { terminal.changeDimensions(container.width, container.height); @@ -106,6 +101,12 @@ container._element.on('click', function () { terminal.focus(); }); + container.on('open', function () { + if (!container.dropControlProceeded) { + container.dropControlProceeded = true; + self._controlDrop(container); + } + }); }); }; @@ -252,6 +253,16 @@ delete stack._contentAreaDimensions.bottom; return area; }; + + // fix GL issue with dropping tab nowhere + var originalOnDrop = stack._$onDrop; + stack._$onDrop = function (contentItem) { + if (!this._dropSegment) { + this._dropSegment = 'header'; + } + + return originalOnDrop.call(stack, contentItem); + }; } };