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

Fix iframe Answers Map/List toggle button on Mobile Error #1150

Merged
merged 5 commits into from
Sep 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions static/js/iframe-common.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export function generateIFrame(domain, answersExperienceFrame) {
iframe.frameBorder = 0;

// For dynamic iFrame sizing
iframe.style.height = '100%';
iframe.style.minHeight = '100%';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little uncertain about this solution. There are a lot of potential problems with setting 100% height.

Can we take a look at this with a test across a few different browsers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should first look at upgrading iframe-resizer which is responsible for resizing the iframe to fill the view height. It's possible there is a bug there: https://www.npmjs.com/package/iframe-resizer

iframe.style.width = '1px';
iframe.style.minWidth = '100%';
iframe.id = 'answers-frame';
Expand Down
Loading