Skip to content

Fix: remove black empty space in fullscreen mode (#5774)#5775

Merged
walterbender merged 1 commit intosugarlabs:masterfrom
anshukaushik4700:fix-fullscreen-black-space
Feb 22, 2026
Merged

Fix: remove black empty space in fullscreen mode (#5774)#5775
walterbender merged 1 commit intosugarlabs:masterfrom
anshukaushik4700:fix-fullscreen-black-space

Conversation

@anshukaushik4700
Copy link
Contributor

Description

This pull request fixes the black empty space appearing at the bottom of the Music Blocks main editor in fullscreen mode. The issue occurred when switching to fullscreen or resizing the browser, causing the editor container to not properly fill the viewport.

What was changed:

  • Updated the main editor container to dynamically adjust its height to match the fullscreen viewport.
  • Removed hardcoded margins and padding that contributed to the black empty space.
  • Ensured that resizing the browser in fullscreen correctly recalculates the container height.

How to Test:

  1. Open Music Blocks in a web browser.
  2. Enter fullscreen mode.
  3. Resize the browser window or toggle fullscreen.
  4. Verify that the editor fully occupies the screen and no black space appears at the bottom.

Screenshots / Videos:
image

Demonstration of the fix in action: https://www.loom.com/share/8555bfd69885488b9abcab083e57149c

References the issue:
Closes #5774

@github-actions
Copy link
Contributor

✅ All Jest tests passed! This PR is ready to merge.

@anshukaushik4700
Copy link
Contributor Author

anshukaushik4700 commented Feb 18, 2026

Hello @walterbender @omsuneri, I’d appreciate it if you could review this PR at your convenience. Thank you!

Copy link
Contributor

@vanshika2720 vanshika2720 left a comment

Choose a reason for hiding this comment

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

@anshukaushik4700 The --vh viewport fix is correct and should resolve the fullscreen black space issue across browsers.

One small question: since resizing the canvas resets its drawing buffer, are we certain this won't introduce flicker or unintended redraw behavior?

@anshukaushik4700
Copy link
Contributor Author

@vanshika2720 Thanks for the review and for pointing that out.

In Music Blocks, the canvas redraw is already handled as part of the normal render loop (e.g. during playback, interactions, and layout changes). The height update happens only on fullscreen toggle or resize events, not continuously, so it shouldn’t introduce noticeable flicker.

I also tested repeated fullscreen toggling and window resizing, and didn’t observe any unintended redraw artifacts or visual glitches. Given the existing redraw behavior, this change should be safe across browsers.

@walterbender walterbender merged commit 6c175b3 into sugarlabs:master Feb 22, 2026
7 checks passed
@anshukaushik4700
Copy link
Contributor Author

Hi @walterbender ,
Thank you so much for reviewing and merging my PR.
looking forward to contributing more and continuing to learn from the community.

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

Successfully merging this pull request may close these issues.

[Bug] Black empty space appears at bottom in fullscreen mode

3 participants