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

add iframe check #2383

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add iframe check #2383

wants to merge 1 commit into from

Conversation

dnoneill
Copy link
Contributor

@dnoneill dnoneill commented Feb 7, 2025

closes #2370

@@ -8,7 +8,7 @@ export default class extends Controller {

addPostCallbackListener() {
window.addEventListener("message", (event) => {
this.iframe.remove()
if (this.iframe) this.iframe.remove()
Copy link
Contributor

Choose a reason for hiding this comment

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

Where would the callback come from if not in the iframe?

Copy link
Contributor Author

@dnoneill dnoneill Feb 7, 2025

Choose a reason for hiding this comment

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

This is really for locally development. If you go to the iframe URL it gives an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

can you show me? The iframe I'm referring to is the one created here: https://github.com/sul-dlss/sul-embed/blob/main/app/javascript/controllers/file_auth_controller.js#L206

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the problem is related to the react-dev tools extension I have. It is sending a message pretty steadily so after the first removal it isn't there. I have a meeting at 1 but I can show you after.

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

Successfully merging this pull request may close these issues.

When viewing the /iframe url for PDF there is a continous error scrolling
2 participants