️ Insert the watermark after the Continue button

Ensure that tab-focus goes from email to the “Continue” button, before focusing the watermark.
This commit is contained in:
Philipp Stracker 2024-09-17 18:24:10 +02:00
parent f3e734dfa7
commit cddada6fa5
No known key found for this signature in database

View file

@ -27,9 +27,16 @@ export const createWatermarkContainer = () => {
'wc-block-checkout-axo-block-watermark-container'
);
emailInput.parentNode.insertBefore(
const emailButton = textInputContainer.querySelector(
'.wc-block-axo-email-submit-button-container'
);
// If possible, insert the watermark after the "Continue" button.
const insertAfterElement = emailButton || emailInput;
insertAfterElement.parentNode.insertBefore(
watermarkReference.container,
emailInput.nextSibling
insertAfterElement.nextSibling
);
watermarkReference.root = createRoot(