diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js index b5eaeb298f..c51f03f017 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-shell.js @@ -145,9 +145,6 @@ nf.Shell = (function () { if (content.length) { var shell = $('#shell'); - // remove the previous contents of the shell - shell.empty(); - // get the parent of the content and detach it var parent = content.parent(); content.detach(); @@ -166,6 +163,9 @@ nf.Shell = (function () { // detach the content and add it back to the parent content.hide().detach().appendTo(parent); + + // remove the previous contents of the shell + shell.empty(); }); // hide the undock button