Skip to content

Conversation

@moaead
Copy link
Contributor

@moaead moaead commented Jan 20, 2026

Summary

Fixes #11965

Problem

When switching from a regular workspace to a workspace containing a split view, there is a brief black flash around the split view area. This flash does not occur when switching between two workspaces that both have split views.

Solution

The black flash was caused by a timing issue in how CSS attributes are applied during split view activation. The CSS rules hide containers that have is-zen-split but not zen-split attribute when the parent has zen-split-view attribute.

The fix reorders the attribute setting in activateSplitView():

  1. Call applyGridToTabs() first to set zen-split attribute on containers
  2. Then set zen-split-view attribute on parent elements

This ensures containers have their zen-split attribute set before the parent zen-split-view CSS rules take effect, preventing the visibility flash.

Changes

  • src/zen/split-view/ZenViewSplitter.mjs: Reordered applyGridToTabs() call in activateSplitView() to run before setting parent attributes, and added zen-split attribute setting in applyGridToTabs() for consistency

Testing

  • Create a split view in workspace A
  • Switch to workspace B (without split view)
  • Switch back to workspace A (with split view)
  • Verify no black flash occurs around the split view area
  • Verify switching between two workspaces with split views still works correctly

Checklist

  • Code follows project style guidelines
  • Changes are minimal and focused
  • Linked to issue with 'Fixes #'

The issue occurs when switching from a regular workspace to one with a
split view. The black flash was caused by a timing issue where CSS rules
hide containers that have is-zen-split but not zen-split attribute when
the parent has zen-split-view attribute.

The fix reorders the attribute setting in activateSplitView():
1. Call applyGridToTabs() first to set zen-split on containers
2. Then set zen-split-view on parent elements

This ensures containers have their zen-split attribute set before
the parent zen-split-view CSS rules take effect, preventing the
visibility:hidden flash.

Fixes zen-browser#11965
@moaead moaead requested a review from mr-cheffy as a code owner January 20, 2026 22:35
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 20, 2026
@dosubot dosubot bot added the Bug label Jan 20, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 21, 2026
@mr-cheffy mr-cheffy merged commit 116d70d into zen-browser:dev Jan 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switching workspaces to a split view will cause the area surround the view to turn black for a second

2 participants