From 3df4b75e84dc247c62a46cbe957012c146a034e1 Mon Sep 17 00:00:00 2001 From: scottbuscemi Date: Fri, 29 May 2026 15:16:52 -0700 Subject: [PATCH] fix(admin): keep rich-text formatting toolbar visible on long posts The editor toolbar scrolled out of view on long documents. Make it `sticky top-0` and switch the editor wrapper from `overflow-hidden` to `overflow-clip` so the rounded corners still clip without establishing a nested scroll container that breaks sticky positioning. The scroll container is the admin shell
, so top-0 pins it under the header. Closes #1192. --- .changeset/fix-sticky-editor-toolbar.md | 5 +++++ packages/admin/src/components/PortableTextEditor.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/fix-sticky-editor-toolbar.md diff --git a/.changeset/fix-sticky-editor-toolbar.md b/.changeset/fix-sticky-editor-toolbar.md new file mode 100644 index 000000000..13688aecd --- /dev/null +++ b/.changeset/fix-sticky-editor-toolbar.md @@ -0,0 +1,5 @@ +--- +"@emdash-cms/admin": patch +--- + +The rich-text editor formatting toolbar now stays pinned to the top of the editing area while scrolling through long posts, instead of scrolling out of view. The toolbar uses `position: sticky` and the editor wrapper switched from `overflow-hidden` to `overflow-clip` so corners stay clipped without creating a nested scroll container that would break sticky positioning. Distraction-free / minimal editors (e.g. Widgets) are unaffected since they don't render the toolbar. diff --git a/packages/admin/src/components/PortableTextEditor.tsx b/packages/admin/src/components/PortableTextEditor.tsx index b7b3a0ddb..4b4f236e9 100644 --- a/packages/admin/src/components/PortableTextEditor.tsx +++ b/packages/admin/src/components/PortableTextEditor.tsx @@ -2338,7 +2338,7 @@ export function PortableTextEditor({ return (
{/* Text formatting */}