From 315b5116666ca1e9dd39441d143ffad4009eb11a Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Mon, 22 Apr 2024 13:46:54 +0100 Subject: [PATCH] Avoid vertical border between editor switch and empty space (#18029) GitOrigin-RevId: 516098061a4d329daf55bb42bcf47a5a412595c1 --- .../components/codemirror-toolbar.tsx | 2 -- .../extensions/toolbar/toolbar-panel.ts | 22 ++++++++----------- .../languages/latex/codemirror-dev-tools.ts | 5 ++--- .../stylesheets/app/editor/toolbar.less | 4 ---- 4 files changed, 11 insertions(+), 22 deletions(-) diff --git a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx index 74a44a0c11..ba765ca886 100644 --- a/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx +++ b/services/web/frontend/js/features/source-editor/components/codemirror-toolbar.tsx @@ -168,8 +168,6 @@ const Toolbar = memo(function Toolbar() { /> )} - -
{ } const devToolsButton = ViewPlugin.define(view => { - const getContainer = () => - document.querySelector('.formatting-buttons-wrapper') + const getContainer = () => document.querySelector('.ol-cm-toolbar-end') const removeButton = () => { getContainer()?.querySelector('#cm6-dev-tools-button')?.remove() @@ -38,7 +37,7 @@ const devToolsButton = ViewPlugin.define(view => { view.dispatch(toggleDevTools()) }) - getContainer()?.prepend(button) + getContainer()?.append(button) } window.setTimeout(() => { diff --git a/services/web/frontend/stylesheets/app/editor/toolbar.less b/services/web/frontend/stylesheets/app/editor/toolbar.less index a27532b7ef..04383ab7af 100644 --- a/services/web/frontend/stylesheets/app/editor/toolbar.less +++ b/services/web/frontend/stylesheets/app/editor/toolbar.less @@ -334,10 +334,6 @@ overflow: hidden; } -.formatting-buttons-wrapper { - display: flex; -} - .formatting-btn { color: @formatting-btn-color; background-color: @formatting-btn-bg;