Fix loading issue with hero-image on JS#32
Open
conradolandia wants to merge 3 commits intospyder-ide:masterfrom
Open
Fix loading issue with hero-image on JS#32conradolandia wants to merge 3 commits intospyder-ide:masterfrom
conradolandia wants to merge 3 commits intospyder-ide:masterfrom
Conversation
CAM-Gerlach
requested changes
Mar 27, 2024
Member
CAM-Gerlach
left a comment
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromdocument.readytowindow.load, binding the function to the load event, and to the resize event.