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 loading issue with hero-image on JS #32

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

conradolandia
Copy link
Contributor

There is a small isue when firing the setHeroHeight() function, firing before the hero image is completely loaded. This PR aims to solve that. I changed the event that fires the function from document.ready to window.load, binding the function to the load event, and to the resize event.

@CAM-Gerlach CAM-Gerlach added the bug Something isn't working label Mar 19, 2024
@CAM-Gerlach CAM-Gerlach added this to the v3.0 milestone Mar 19, 2024
Copy link
Member

@CAM-Gerlach CAM-Gerlach left a comment

Choose a reason for hiding this comment

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

Just to clarify the current status of this PR, I originally suggested @conradolandia refactor it as previously discussed to use the JQuery on method rather than the legacy alias bind, and add the event handler inside the function rather than as a separate block. However, upon further detailed testing, it became apparent that regardless this was still not actually fixing the problem, and the code was still not firing correctly on first or cache-invalidating force-reload, meaning the resize of the hero image was still not correct and it did not fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants