From b1bc71e2e5fbc2bcbb7fe136e2811b6422066544 Mon Sep 17 00:00:00 2001 From: atharvasalunke1267 <245171056+atharvasalunke1267@users.noreply.github.com> Date: Sat, 24 Oct 2026 05:12:59 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B(frontend)=20hide=20source=20po?= =?UTF-8?q?pup=20in=20read-only=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BlockNote opens the math and diagram source popup from the selection even when the editor is not editable. Hide it unless the editor is explicitly editable, which also covers presentation mode. Signed-off-by: atharvasalunke1267 <245171056+atharvasalunke1267@users.noreply.github.com> --- .../apps/impress/src/features/docs/doc-editor/styles.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx index b39311a847..afdafbb537 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx @@ -68,6 +68,14 @@ export const DocsEditorStyle = createGlobalStyle` pointer-events: none; } + /** + * Read-only and presentation mode: the source popup of math and diagram blocks must not open + * (BlockNote opens it from the selection even when the editor is not editable, so we need to prevent it here). + */ + .bn-editor:not([contenteditable='true']) .bn-source-block-popup { + display: none; + } + /** * Collaboration cursor styles */ From 7abe5f74159d8a01ee7053af2ac7af7858b5ca80 Mon Sep 17 00:00:00 2001 From: atharvasalunke1267 <245171056+atharvasalunke1267@users.noreply.github.com> Date: Sat, 24 Oct 2026 05:48:01 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B(frontend)=20clarify=20popup=20?= =?UTF-8?q?comment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Describe the rule as visual hiding only. Signed-off-by: atharvasalunke1267 <245171056+atharvasalunke1267@users.noreply.github.com> --- .../apps/impress/src/features/docs/doc-editor/styles.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx index afdafbb537..f8d4dfae37 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx @@ -69,8 +69,9 @@ export const DocsEditorStyle = createGlobalStyle` } /** - * Read-only and presentation mode: the source popup of math and diagram blocks must not open - * (BlockNote opens it from the selection even when the editor is not editable, so we need to prevent it here). + * Read-only and presentation mode: visually hide the source popup of math + * and diagram blocks. (BlockNote opens it from the selection even when + * the editor is not editable, so this only hides it and does not prevent it). */ .bn-editor:not([contenteditable='true']) .bn-source-block-popup { display: none; From fb45fb2519b1066ef109511caaa71e7dc44b82bf Mon Sep 17 00:00:00 2001 From: atharvasalunke1267 <245171056+atharvasalunke1267@users.noreply.github.com> Date: Sat, 24 Oct 2026 05:51:45 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=93=9D(changelog)=20add=20entry=20for?= =?UTF-8?q?=20read-only=20popup=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: atharvasalunke1267 <245171056+atharvasalunke1267@users.noreply.github.com> --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 718999151b..b06b51320b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +- 🐛(frontend) hide source popup in read-only mode #2908 ### Changed