From b057ed1b9a14169a01b48de5d579e2d463b07ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Albeza?= Date: Wed, 15 Oct 2025 15:20:36 +0200 Subject: [PATCH] :bug: Fix scroll on inspect tab --- CHANGES.md | 1 + frontend/src/app/main/ui/inspect/right_sidebar.scss | 5 ++++- frontend/src/app/main/ui/workspace/sidebar/options.scss | 5 ++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 83708db5bb..0688933f4c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -56,6 +56,7 @@ - Fix auto-width changes to fixed when switching variants [Taiga #12172](https://tree.taiga.io/project/penpot/issue/12172) - Fix component number has no singular translation string [Taiga #12106](https://tree.taiga.io/project/penpot/issue/12106) - Fix adding/removing identical text fills [Taiga #12287](https://tree.taiga.io/project/penpot/issue/12287) +- Fix scroll on the inspect tab [Taiga #12293](https://tree.taiga.io/project/penpot/issue/12293) ## 2.10.1 diff --git a/frontend/src/app/main/ui/inspect/right_sidebar.scss b/frontend/src/app/main/ui/inspect/right_sidebar.scss index ffcc1f11c7..a4c3e6cf45 100644 --- a/frontend/src/app/main/ui/inspect/right_sidebar.scss +++ b/frontend/src/app/main/ui/inspect/right_sidebar.scss @@ -146,9 +146,12 @@ .viewer-tab-switcher { --tabs-nav-padding-inline-start: 0; --tabs-nav-padding-inline-end: var(--sp-m); - --max-inspect-tab-height: calc(100vh - 12rem); + /* same height as .element-options in workspace/sidebar/options.scss */ + /* which is one of the parents of this component */ + --max-inspect-tab-height: var(--sidebar-element-options-height); max-block-size: var(--max-inspect-tab-height); + overflow: auto; } diff --git a/frontend/src/app/main/ui/workspace/sidebar/options.scss b/frontend/src/app/main/ui/workspace/sidebar/options.scss index 0967561672..93e63cdbd3 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options.scss +++ b/frontend/src/app/main/ui/workspace/sidebar/options.scss @@ -30,7 +30,10 @@ flex-direction: column; gap: deprecated.$s-8; width: 100%; - height: calc(100vh - $sz-88); + /* FIXME: This is hacky and prone to break, we should tackle the whole layout + of the sidebar differently */ + --sidebar-element-options-height: calc(100vh - $sz-88); + height: var(--sidebar-element-options-height); padding-top: deprecated.$s-8; }