Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resizeWindow not firing when window is resized #36

Open
dustingraham opened this issue Aug 7, 2018 · 4 comments
Open

resizeWindow not firing when window is resized #36

dustingraham opened this issue Aug 7, 2018 · 4 comments

Comments

@dustingraham
Copy link

I have gotten the form to display in an iframe on my page following README-AcceptHosted.md

The communicator seems to be working. I have a console.log printing any time onmessage fires.

If I make the browser window wide or narrow it does not fire resizeWindow (bug)

If I start with a wide window, then drag to a narrow window, the submit button is clipped off. I can, at that point, click on the alternative payment method (i.e. toggle between credit card or bank account) and it triggers a resizeWindow event. This then shows the button. But the simple act of resizing the window does not seem to be triggering an event.

Sometimes users will maximize or resize their window, and I can't seem to figure out a way to handle that gracefully without being able to access the height of the hosted form.

@dustingraham
Copy link
Author

screenshot from 2018-08-07 10-11-50

Same issue with downloading the sample app. The page was loaded in full screen, then the window was no longer full screen and the submit button clips off. I believe authorize.net hosted form needs to send a resize event when the window resizes, not just on load, or when payment type is changed.

@skjbulcher
Copy link

I'm having the same issue on my integration (using the sandbox). The iframe communicator isn't receiving any message at all when the iframe resizes. I have confirmed this with logging in the iframe communicator.

This is what my form looks like when starting wide, where the iframe width is >= 450px. This triggers the double-column layout. Practically speaking, there is dead space between 450px and 673px where the second column doesn't display properly, so we've tweaked the page never to allow the iframe to take those widths.
image

Reducing the width of the page such that the iframe width is <= 449px hides the pay button This triggers the single-column layout on the authorize.net payment form, but without resizing the iframe, there is no pay button at all. It makes our developers look very sloppy.
image

Of course resizing in the reverse direction (from a narrow page to a wide page) causes a large whitespace to appear, because the iframe isn't notifying the communicator the height has been reduced.
image

@skjbulcher
Copy link

I should mention that on page load resizeWindow does trigger, and I am handling the event properly (hence the difference in height between my two examples)

@mithatb
Copy link

mithatb commented Aug 12, 2023

i have the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants