From 970f69be539f3984e0f5f435f4a94d81e0ee9427 Mon Sep 17 00:00:00 2001 From: Alexander Minges Date: Thu, 17 Jul 2025 18:19:06 +0200 Subject: [PATCH] fix(editor): prevent double scrollbars in biography tab --- scss/components/actor/_biography.scss | 40 +++++++++++++++++++++++++ scss/components/shared/_editor.scss | 36 ++++++++++++++++++++++ scss/components/shared/_sheet_body.scss | 5 ++++ 3 files changed, 81 insertions(+) diff --git a/scss/components/actor/_biography.scss b/scss/components/actor/_biography.scss index cf033a71..058b30f4 100644 --- a/scss/components/actor/_biography.scss +++ b/scss/components/actor/_biography.scss @@ -8,4 +8,44 @@ display: grid; grid-template-columns: 1fr 3fr; column-gap: 1em; + height: 100%; +} + +.ds4-biography { + height: 100%; + overflow: hidden; + + prose-mirror { + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + + // Edit mode with editor container + &.active { + .editor-container { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + + .editor-content { + flex: 1; + overflow-y: auto; + min-height: 0; + } + } + } + + // View mode - direct editor-content + &.inactive { + .editor-content { + position: relative; + flex: 1; + overflow-y: auto; + min-height: 0; + inset: auto; + } + } + } } diff --git a/scss/components/shared/_editor.scss b/scss/components/shared/_editor.scss index dead15ce..58bbe088 100644 --- a/scss/components/shared/_editor.scss +++ b/scss/components/shared/_editor.scss @@ -14,5 +14,41 @@ background: transparent; } } + + prose-mirror { + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; + + // Edit mode with editor container + &.active { + .editor-container { + flex: 1; + display: flex; + flex-direction: column; + overflow: hidden; + + .editor-content { + flex: 1; + overflow-y: auto; + min-height: 0; + } + } + } + + // View mode - direct editor-content + &.inactive { + .editor-content { + position: relative; + flex: 1; + overflow-y: auto; + min-height: 0; + inset: auto; + } + } + } } + + } diff --git a/scss/components/shared/_sheet_body.scss b/scss/components/shared/_sheet_body.scss index 3b19d5ca..0718c6a6 100644 --- a/scss/components/shared/_sheet_body.scss +++ b/scss/components/shared/_sheet_body.scss @@ -7,4 +7,9 @@ .ds4-sheet-body { height: 100%; overflow-y: auto; + + // Prevent double scrollbars on biography tab + .ds4-sheet-tab.tab.biography.active { + overflow: hidden; + } }