fix: add custom resize event#44
Draft
henriettemoe wants to merge 1 commit into
Draft
Conversation
boyum
reviewed
Nov 1, 2023
| requestAnimationFrame(() => { | ||
| // Trigger custom event instead of H5P event to avoid | ||
| // triggering resize until breakpoints have been applied. | ||
| context.trigger('resizecontenttype'); |
Contributor
There was a problem hiding this comment.
We could even do context.resize() and avoid the custom event. Not sure what is more readable.
Contributor
Author
There was a problem hiding this comment.
Edit: no it didn't work as it was not possible to drag arguments
Contributor
There was a problem hiding this comment.
That's weird. Does it work to drag arguments with the current changes?
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.
EDIT: after the merge of #42 this problem does not seem to be an big issue anymore. It is now a 0.97 px difference between the actual height and the iframe height atm.
Need to trigger resize after breakpoints have been applied. In the case where you have multiple categories the iframe is resized before the breakpoint css is applied, therefore the the content is taller than the iframe.
Screenshot from before the change:

Screenshot from after the change:
