move iframeholderdiv styles to after added to DOM

This commit is contained in:
Cappy Popp 2021-01-07 16:12:57 -05:00
parent 9f93801cb5
commit 014723144c

View File

@ -31,8 +31,10 @@
linkedInAutofillClicked = false; linkedInAutofillClicked = false;
// style the holder div // style the holder div
iframeHolderDiv.style.textAlign = 'center'; // 1/17/21 - disabled because not being set, trying
iframeHolderDiv.style.margin = '10px 0px'; // to move to after add to DOM
// iframeHolderDiv.style.textAlign = 'center';
// iframeHolderDiv.style.margin = '10px 0px';
// required by LinkedIn // required by LinkedIn
fillScript.setAttribute('type', 'IN/Form2'); fillScript.setAttribute('type', 'IN/Form2');
@ -102,6 +104,10 @@
autoFillLocation.prepend(iframeHolderDiv); autoFillLocation.prepend(iframeHolderDiv);
autoFillLocation.append(liAutoFillScript); 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') { if (typeof MktoForms2 !== 'undefined') {
MktoForms2.whenReady(function (form) { MktoForms2.whenReady(function (form) {
// need the id of the form so we can hook up autofill // need the id of the form so we can hook up autofill