diff --git a/docs/en_US/images/preferences_browser_display.png b/docs/en_US/images/preferences_browser_display.png
index a8b90db44fb2b9ac3c6d5316c8cd0431ebd895d9..e9d0c096cf1c1afa00569103fb6bb3db36b0c22a 100644
GIT binary patch
diff --git a/docs/en_US/preferences.rst b/docs/en_US/preferences.rst
index b7a86446d..5a85fe0d2 100644
--- a/docs/en_US/preferences.rst
+++ b/docs/en_US/preferences.rst
@@ -34,6 +34,10 @@ Use the fields on the *Display* panel to specify general display preferences:
   saving interval. A value of *-1* will disable the treeview state saving
   functionality.
 
+* When the *Confirm before closing properties with unsaved changes* switch is set to *True*,
+  pgAdmin will warn you before closing the properties dialog of an object if there
+  are any unsaved changes. On user confirmation, the properties dialog will close.
+
 * When the *Confirm on close or refresh* switch is set to *True*, pgAdmin will
   attempt to catch browser close or refresh events and prompt before allowing
   them to continue.
diff --git a/web/pgadmin/browser/register_browser_preferences.py b/web/pgadmin/browser/register_browser_preferences.py
index bb5da06c1..310b30a27 100644
--- a/web/pgadmin/browser/register_browser_preferences.py
+++ b/web/pgadmin/browser/register_browser_preferences.py
@@ -54,6 +54,16 @@ def register_browser_preferences(self):
         )
     )
 
+    self.preference.register(
+        'display', 'confirm_on_properties_close',
+        gettext("Confirm before closing properties with unsaved changes ?"), 'boolean',
+        True, category_label=gettext('Display'),
+        help_str=gettext(
+            'Confirm before closure of properties dialog for an object if the changes '
+            'are not saved'
+        )
+    )
+
     self.preference.register(
         'display', 'auto_expand_sole_children',
         gettext("Auto-expand sole children"), 'boolean', True,
diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js
index 00d5b44a1..d7e28d349 100644
--- a/web/pgadmin/browser/static/js/node.js
+++ b/web/pgadmin/browser/static/js/node.js
@@ -1535,6 +1535,39 @@ define('pgadmin.browser.node', [
         onEdit = editInNewPanel.bind(panel);
       }
       if (panel.closeable()) {
+        panel.on(wcDocker.EVENT.CLOSING, function() {
+          var j = this.$container.find('.obj_properties').first(),
+            view = j && j.data('obj-view'),
+            self = this;
+
+          let confirm_on_properties_close = pgBrowser.get_preferences_for_module('browser').confirm_on_properties_close;
+          if (view && view.model && confirm_on_properties_close) {
+            if(view.model.sessChanged()){
+              Alertify.confirm(
+                gettext('Warning'),
+                gettext('Changes will be lost. Are you sure you want to close ?'),
+                function() {
+                  setTimeout(function(){
+                    self.off(wcDocker.EVENT.CLOSING);
+                    self.close();
+                  }, 50);
+                  return true;
+                },
+                function() {
+                  return true;
+                }
+              ).set('labels', {
+                ok: gettext('Yes'),
+                cancel: gettext('No'),
+              }).show();
+            } else {
+              return true;
+            }
+          } else {
+            return true;
+          }
+        }.bind(panel));
+
         var onCloseFunc = function() {
           var j = this.$container.find('.obj_properties').first(),
             view = j && j.data('obj-view');
