diff --git a/web/pgadmin/browser/static/js/frame.js b/web/pgadmin/browser/static/js/frame.js
index 0d3b91273..dc4ec5527 100644
--- a/web/pgadmin/browser/static/js/frame.js
+++ b/web/pgadmin/browser/static/js/frame.js
@@ -18,7 +18,7 @@ define([
   pgAdmin.Browser.Frame = function(options) {
     var defaults = [
       'name', 'title', 'width', 'height', 'showTitle', 'isCloseable',
-      'isPrivate', 'url', 'icon', 'onCreate',
+      'isPrivate', 'url', 'icon', 'onCreate', 'isLayoutMember',
     ];
     _.extend(this, _.pick(options, defaults));
   };
@@ -32,6 +32,7 @@ define([
     isClosable: true,
     isRenamable: false,
     isPrivate: false,
+    isLayoutMember: false,
     url: '',
     icon: '',
     panel: null,
@@ -43,6 +44,7 @@ define([
         docker.registerPanelType(this.name, {
           title: that.title,
           isPrivate: that.isPrivate,
+          isLayoutMember: that.isLayoutMember,
           onCreate: function(myPanel) {
             $(myPanel).data('pgAdminName', that.name);
             myPanel.initSize(that.width, that.height);
diff --git a/web/pgadmin/tools/datagrid/static/js/datagrid.js b/web/pgadmin/tools/datagrid/static/js/datagrid.js
index 80ce35680..f0d7cee6f 100644
--- a/web/pgadmin/tools/datagrid/static/js/datagrid.js
+++ b/web/pgadmin/tools/datagrid/static/js/datagrid.js
@@ -220,10 +220,10 @@ define('pgadmin.datagrid', [
         var width = this.$container.width();
         var height = this.$container.height();
 
-        $(wcDocker).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
-        $(wcDocker).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
-        $(wcDocker).find('.wcIFrameFloating').css('width', width);
-        $(wcDocker).find('.wcIFrameFloating').css('height', height);
+        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('height', height);
       },
 
       launch_grid: function(trans_id, panel_url, is_query_tool, panel_title, sURL=null, sql_filter=null) {
@@ -284,13 +284,13 @@ define('pgadmin.datagrid', [
           });
 
           queryToolPanel.on(wcDocker.EVENT.DETACHED, function() {
-            $(wcDocker).find('.wcIFrameFloating').attr({
+            $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
               style: 'z-index: 1200'
             });
           });
 
           queryToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
-            $(wcDocker).find('.wcIFrameFloating').attr({
+            $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
               style: 'z-index: 1200'
             });
           });
diff --git a/web/pgadmin/tools/debugger/static/js/debugger_ui.js b/web/pgadmin/tools/debugger/static/js/debugger_ui.js
index 5b6041d5b..4bbc3c509 100644
--- a/web/pgadmin/tools/debugger/static/js/debugger_ui.js
+++ b/web/pgadmin/tools/debugger/static/js/debugger_ui.js
@@ -796,6 +796,31 @@ define([
                           method: 'DELETE',
                         });
                       });
+                      panel.on(wcDocker.EVENT.DETACHED, function() {
+
+                        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+                          style: 'z-index: 1200'
+                        });
+
+                      });
+                      panel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
+
+                        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+                          style: 'z-index: 1200'
+                        });
+                      });
+                      panel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
+                        var docker = this.docker(this._panel);
+                        var dockerPos = docker.$container.offset();
+                        var pos = this.$container.offset();
+                        var width = this.$container.width();
+                        var height = this.$container.height();
+
+                        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+                        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+                        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+                        $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').find('.wcIFrameFloating').css('height', height);
+                      });
 
                       // Panel Rename event
                       panel.on(wcDocker.EVENT.RENAME, function(panel_data) {
diff --git a/web/pgadmin/tools/erd/static/js/erd_module.js b/web/pgadmin/tools/erd/static/js/erd_module.js
index 1e414e43f..4aea010ca 100644
--- a/web/pgadmin/tools/erd/static/js/erd_module.js
+++ b/web/pgadmin/tools/erd/static/js/erd_module.js
@@ -166,6 +166,20 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, pgBrowser
           });
         });
 
+        erdToolPanel.on(wcDocker.EVENT.DETACHED, function() {
+          $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+            style: 'z-index: 1200'
+          });
+        });
+
+        erdToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
+          $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
+            style: 'z-index: 1200'
+          });
+        });
+
+        erdToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, this.resize_the_erdtool);
+
         var openErdToolURL = function(j) {
           // add spinner element
           let $spinner_el =
@@ -196,6 +210,19 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, pgBrowser
       }
     },
 
+    resize_the_erdtool: function(){
+      var docker = this.docker(this._panel);
+      var dockerPos = docker.$container.offset();
+      var pos = this.$container.offset();
+      var width = this.$container.width();
+      var height = this.$container.height();
+
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('height', height);
+    },
+
     getPanelUrls: function(transId, panelTitle, parentData, gen) {
       let openUrl = url_for('erd.panel', {
         trans_id: transId,
diff --git a/web/pgadmin/tools/psql/static/js/psql_module.js b/web/pgadmin/tools/psql/static/js/psql_module.js
index 54b2d79c8..68a3836f3 100644
--- a/web/pgadmin/tools/psql/static/js/psql_module.js
+++ b/web/pgadmin/tools/psql/static/js/psql_module.js
@@ -182,13 +182,13 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
         var psqlToolPanel = pgBrowser.docker.addPanel('frm_psqltool', wcDocker.DOCK.STACKED, propertiesPanel[0]);
 
         psqlToolPanel.on(wcDocker.EVENT.DETACHED, function() {
-          $(wcDocker).find('.wcIFrameFloating').attr({
+          $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
             style: 'z-index: 1200'
           });
         });
 
         psqlToolPanel.on(wcDocker.EVENT.ORDER_CHANGED, function() {
-          $(wcDocker).find('.wcIFrameFloating').attr({
+          $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').attr({
             style: 'z-index: 1200'
           });
         });
@@ -238,10 +238,10 @@ export function initialize(gettext, url_for, $, _, pgAdmin, csrfToken, Browser)
       var width = this.$container.width();
       var height = this.$container.height();
 
-      $(wcDocker).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
-      $(wcDocker).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
-      $(wcDocker).find('.wcIFrameFloating').css('width', width);
-      $(wcDocker).find('.wcIFrameFloating').css('height', height);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('top', pos.top - dockerPos.top);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('left', pos.left - dockerPos.left);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('width', width);
+      $((this.$container)[0].ownerDocument).find('.wcIFrameFloating').css('height', height);
     },
     getPanelUrls: function(transId, panelTitle, parentData) {
       let openUrl = url_for('psql.panel', {
