From efb30d1c57583a287f7d04e0028d307f5ad66654 Mon Sep 17 00:00:00 2001 From: bob Date: Wed, 17 Jul 2019 13:56:55 -0400 Subject: trying to reduce the number of times items are moved to a different div in golden layout. --- src/client/goldenLayout.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/goldenLayout.js b/src/client/goldenLayout.js index 28c009645..ad78139c1 100644 --- a/src/client/goldenLayout.js +++ b/src/client/goldenLayout.js @@ -3995,9 +3995,11 @@ lm.items.AbstractContentItem.prototype.removeChild.call(this, contentItem, keepChild); if (this.contentItems.length === 1 && this.config.isClosable === true) { - childItem = this.contentItems[0]; - this.contentItems = []; - this.parent.replaceChild(this, childItem, true); + // bcz: this has the effect of removing children from the DOM and then re-adding them above where they were before. + // in the case of things like an iFrame with a YouTube video, the video will reload for now reason. So let's try leaving these "empty" rows alone. + // childItem = this.contentItems[0]; + // this.contentItems = []; + // this.parent.replaceChild(this, childItem, true); } else { this.callDownwards('setSize'); this.emitBubblingEvent('stateChanged'); -- cgit v1.2.3-70-g09d2