From 014723144caa1ea98b95697675a18dbface6a6cb Mon Sep 17 00:00:00 2001 From: Cappy Popp <356651+cappypopp@users.noreply.github.com> Date: Thu, 7 Jan 2021 16:12:57 -0500 Subject: [PATCH] move iframeholderdiv styles to after added to DOM --- LinkedIn - Demo Form Autofill.html | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/LinkedIn - Demo Form Autofill.html b/LinkedIn - Demo Form Autofill.html index ce80bf0..a2418df 100644 --- a/LinkedIn - Demo Form Autofill.html +++ b/LinkedIn - Demo Form Autofill.html @@ -31,8 +31,10 @@ linkedInAutofillClicked = false; // style the holder div - iframeHolderDiv.style.textAlign = 'center'; - iframeHolderDiv.style.margin = '10px 0px'; + // 1/17/21 - disabled because not being set, trying + // to move to after add to DOM + // iframeHolderDiv.style.textAlign = 'center'; + // iframeHolderDiv.style.margin = '10px 0px'; // required by LinkedIn fillScript.setAttribute('type', 'IN/Form2'); @@ -102,6 +104,10 @@ autoFillLocation.prepend(iframeHolderDiv); autoFillLocation.append(liAutoFillScript); + // moved from above to ensure it's in DOM before adding styles + iframeHolderDiv.style.textAlign = 'center'; + iframeHolderDiv.style.margin = '10px 0px'; + if (typeof MktoForms2 !== 'undefined') { MktoForms2.whenReady(function (form) { // need the id of the form so we can hook up autofill