Skip to content

Embed code inside modal not loading on page load #279

Open
@brakai295

Description

@brakai295

I'm using the standard modal implementation for an embed code for a payment form. That embed code is essentially a bit of JS that loads an iFrame.

Even though I have the modal with the embed code loaded on the same page, only when I click to open the modal does the embed code load. This causes a ~1 second delay and the modal jumps. Here's a quick video to show what I mean: https://dsh.re/2b0e9

I checked with the support team of payment provider and they said:

The embed code is actually loading on page load, but the modal library copies the element into the modal on each "click" so it has to reload the iframe each time you open the modal.

Is there a way around this? I've also tried implementing it via the ajax method, but it has the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions