fix: Fixed scrollbar in example output frame (cherry-pick from #745)#1431
Open
Nwakaego-Ego wants to merge 1 commit into
Open
fix: Fixed scrollbar in example output frame (cherry-pick from #745)#1431Nwakaego-Ego wants to merge 1 commit into
Nwakaego-Ego wants to merge 1 commit into
Conversation
Contributor
|
@Nwakaego-Ego Since this component is used often, can you double check this change on some of the other pages? |
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.
Fixes #716
This is a clean cherry-pick of the relevant fix from #745 by @Its-sunny69 whose branch had carried over unrelated commits.
The fix removes the hardcoded width and height from the iframe in src/components/CodeEmbed/frame.tsx and lets it fill its parent container instead. Before this change, both the parent and the iframe were declaring the same size separately. Now, only the parent controls the size, which removes the confusion that was likely causing Chrome to show unnecessary scrollbars at certain zoom levels.
Note: I could not reproduce the bug locally or on the live site. I also found that index.jsx line 94 already has overflow-hidden on the parent container, which may explain why the bug is hard to reproduce consistently. The fix is still worth merging as it makes the code cleaner.