Skip to content

onLoad function Safari support #83

@EyalDelarea

Description

@EyalDelarea

Hey there,
I'm intergrading an Iframe for a payment process and i'm displaying a spinner untill the Iframe has been loaded fully.
For some reason it doesn't support Safari browser, at which the spinner isn't going away after the page has been loaded.

{(iFrameLoading ) ? <Spinner/> : null} <Iframe src={text} width='350px' height='550px' styles={IframeStyle} url={text} onLoad={reDirect} scrolling='no' />

my onLoad function :
Here im using a counter to count the amount of redirects,one means redirecting the Iframe to the desired URL and second redirect means redircted from inside the Iframe.

const reDirect = async () => { setCount(count + 1) if (count === 1) { setIframeLoading(false) } }

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