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

Change of source image within content-source conflict #120

Open
hirschferkel opened this issue Feb 12, 2019 · 2 comments
Open

Change of source image within content-source conflict #120

hirschferkel opened this issue Feb 12, 2019 · 2 comments

Comments

@hirschferkel
Copy link

hirschferkel commented Feb 12, 2019

When i try to change the src e.g. within an iframe which is part of the content_source of modaal, modaal will reload the whole content, which I want to disable.
If I have to modaal setup it even recognizes that there is a change in another iframe and makes some updates in the back, which I can not catch.

The problem is, that this "page update" ist sometimes after after_close.

How can I prevent Modaal from reloading the content_source even of other iframes which use the same modaal on one page?

Best, hirschferkel

@danhumaan
Copy link
Collaborator

hi @hirschferkel, can't say i've experience what I think you're describing, can you please provide an example of the issue hitting? Maybe setup a JS fiddle or something similar so we can see. It might be an issue with modaal or something else on the page.

@hirschferkel
Copy link
Author

hirschferkel commented Feb 13, 2019

@danb-humaan thanks for your answer, which actually helped me to find the problem. I integrated a trigger-button within the element, which was getting loaded with modaal. After opening modaal I wanted to hide this button, while modaal is active. It shoulg getsvisible again, when modaal is closed.

All problems resulted in the injection of the code after the overlay is closed, as modaal fires the after_close function while it starts the injection of the code into its origin and not after the injection has finished!
So I had to integrate some checks if the elements are already loaded before actions take place. They just are ignored when modaal fires too early.

I think this is no problem with images, but with more complex elements.

You can have a look at the finished integration if you want: Modaal Map Changer Overlay

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

2 participants