diff --git a/themes/custom/ts_wrin/js/components/wri_cta_banners.js b/themes/custom/ts_wrin/js/components/wri_cta_banners.js index 09432c835..db0adc694 100644 --- a/themes/custom/ts_wrin/js/components/wri_cta_banners.js +++ b/themes/custom/ts_wrin/js/components/wri_cta_banners.js @@ -114,8 +114,13 @@ export default function(context) { selectedModal.setAttribute("role", "dialog"); selectedModal.setAttribute("aria-labelledby", "modalTitle"); selectedModal.setAttribute("aria-describedby", "modalMessage"); - selectedModal.querySelector(".field--name-field-title").id = "modalTitle"; - selectedModal.querySelector(".field--name-field-intro").id = "modalMessage"; + if (selectedModal.querySelector(".field--name-field-title")) { + selectedModal.querySelector(".field--name-field-title").id = "modalTitle"; + } + if (selectedModal.querySelector(".field--name-field-intro")) { + selectedModal.querySelector(".field--name-field-intro").id = + "modalMessage"; + } showModal(selectedModal); } diff --git a/themes/custom/ts_wrin/sass/components/_popup_modal.scss b/themes/custom/ts_wrin/sass/components/_popup_modal.scss index ad5d580ce..9d95dd608 100644 --- a/themes/custom/ts_wrin/sass/components/_popup_modal.scss +++ b/themes/custom/ts_wrin/sass/components/_popup_modal.scss @@ -4,7 +4,6 @@ .region-top-modals .block-modal { display: none; - position: absolute; z-index: 100; button.ui-button { all: unset;