Skip to content

Commit

Permalink
Classic theme preview: remove admin-bar class name (WordPress#68519)
Browse files Browse the repository at this point in the history
Co-authored-by: carolinan <poena@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org>
  • Loading branch information
4 people authored Jan 7, 2025
1 parent d7add4a commit 6763765
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/edit-site/src/components/maybe-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 6763765

Please sign in to comment.