diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
index 94fc0859d1..58d8f7933a 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/bulletin-board/nf-bulletin-board.js
@@ -196,7 +196,7 @@ nf.ng.BulletinBoardCtrl = function (serviceProvider) {
*/
var poll = function () {
// if the page is no longer open, stop polling
- var isOpen = $('body').is(':visible');
+ var isOpen = $('#bulletin-board').is(':visible');
if (!isOpen) {
bulletinBoardCtrl.polling = false;
}
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 93cbfb3c6c..b5eaeb298f 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
@@ -94,11 +94,10 @@ nf.Shell = (function () {
canUndock = true;
}
- // remove the previous contents of the shell
- shell.empty();
-
// register a new close handler
$('#shell-dialog').modal('setCloseHandler', function () {
+ // remove the previous contents of the shell
+ shell.empty();
deferred.resolve();
});