From b78539d0d5fe0ecb39e7ca4c7226eadb2f62659d Mon Sep 17 00:00:00 2001 From: "nida.ghuman" Date: Wed, 25 Jan 2023 15:55:17 -0500 Subject: [PATCH 1/2] Fixed issue with body content disappearing behind footer --- playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss b/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss index 21a5ff53dd..9751ef7614 100644 --- a/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss +++ b/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss @@ -227,6 +227,9 @@ height: 100%; max-height: 100%; max-width: none; + .dialog_body { + padding-bottom: $space_xl * 2 !important; + } .dialog_footer { position:fixed; bottom: 0; @@ -287,6 +290,9 @@ height: 100% !important; max-height: 100% !important; max-width: 100%; + .dialog_body { + padding-bottom: $space_xl * 2 !important; + } .dialog_footer { position:fixed; bottom: 0; From 941aa058d78f37566a5abcd92b6230d4e4c3b05e Mon Sep 17 00:00:00 2001 From: "nida.ghuman" Date: Thu, 2 Feb 2023 09:13:54 -0500 Subject: [PATCH 2/2] Using pseudo div instead of padding to fix issue --- .../app/pb_kits/playbook/pb_dialog/_dialog.scss | 14 +++++++++----- .../pb_dialog/child_kits/_dialog_footer.tsx | 2 ++ .../playbook/pb_dialog/dialog_footer.html.erb | 1 + 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss b/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss index 9751ef7614..241fc23a5c 100644 --- a/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss +++ b/playbook/app/pb_kits/playbook/pb_dialog/_dialog.scss @@ -227,9 +227,11 @@ height: 100%; max-height: 100%; max-width: none; - .dialog_body { - padding-bottom: $space_xl * 2 !important; - } + //this empty div only has height when dialog is full height. + //fix for dialog body content disappearing behind sticky footer + .dialog-pseudo-footer { + height: $space_xl * 2; + } .dialog_footer { position:fixed; bottom: 0; @@ -290,8 +292,10 @@ height: 100% !important; max-height: 100% !important; max-width: 100%; - .dialog_body { - padding-bottom: $space_xl * 2 !important; + //this empty div only has height when dialog is full height. + //fix for dialog body content disappearing behind sticky footer + .dialog-pseudo-footer { + height: $space_xl * 2; } .dialog_footer { position:fixed; diff --git a/playbook/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx b/playbook/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx index 3eb86f88c6..9d50ec942c 100644 --- a/playbook/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx +++ b/playbook/app/pb_kits/playbook/pb_dialog/child_kits/_dialog_footer.tsx @@ -41,6 +41,8 @@ const DialogFooter = (props: DialogFooterProps) => { {separator && } +
+
<% if object.confirm_button && object.cancel_button %> + <%= pb_rails("flex", props: { classname:object.classname, spacing:"between", padding_x:"sm", padding:"sm", padding_bottom:"sm" }) do %> <%= pb_rails("button", props: { type: "submit", id: object.confirm_button_id }) do %> <%= object.confirm_button %>