mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
♿️ 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:
parent
f3e734dfa7
commit
cddada6fa5
1 changed files with 9 additions and 2 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue