From de434ea953f5ae45f48ca0f3a0c1ff6e24f8ca9b Mon Sep 17 00:00:00 2001 From: Carolina Nymark Date: Tue, 7 Jan 2025 10:57:32 +0100 Subject: [PATCH] Classic theme preview: remove admin-bar class name --- packages/edit-site/src/components/maybe-editor/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/edit-site/src/components/maybe-editor/index.js b/packages/edit-site/src/components/maybe-editor/index.js index bee1c427c87b4..3ffa5a35b82ef 100644 --- a/packages/edit-site/src/components/maybe-editor/index.js +++ b/packages/edit-site/src/components/maybe-editor/index.js @@ -43,6 +43,9 @@ export function MaybeEditor( { showEditor = true } ) { document .getElementsByTagName( 'html' )[ 0 ] .setAttribute( 'style', 'margin-top: 0 !important;' ); + document + .getElementsByTagName( 'body' )[ 0 ] + .classList.remove( 'admin-bar' ); // Make interactive elements unclickable. const interactiveElements = document.querySelectorAll( 'a, button, input, details, audio'