From d5e2933c69099216b85066a8e442f34daaceec61 Mon Sep 17 00:00:00 2001 From: Behrokh Satarnejad Date: Thu, 25 Jan 2024 11:43:54 +0100 Subject: [PATCH] changing how to select body --- app/components/primer/open_project/zen_mode_button.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/primer/open_project/zen_mode_button.ts b/app/components/primer/open_project/zen_mode_button.ts index 7dcaacdbc8..e306e2f1e2 100644 --- a/app/components/primer/open_project/zen_mode_button.ts +++ b/app/components/primer/open_project/zen_mode_button.ts @@ -9,7 +9,7 @@ class ZenModeButtonElement extends HTMLElement { private deactivateZenMode() { this.inZenMode = false this.button.classList.remove('zen-mode-button--active') - this.querySelector('body')?.classList.remove('zen-mode') + document.getElementsByTagName('body')[0].classList.remove('zen-mode') if (screenfull.isEnabled && screenfull.isFullscreen) { screenfull.exit() } @@ -17,7 +17,7 @@ class ZenModeButtonElement extends HTMLElement { private activateZenMode() { this.inZenMode = true - document.querySelector('body')?.classList.add('zen-mode') + document.getElementsByTagName('body')[0].classList.add('zen-mode') this.button.classList.add('zen-mode-button--active') if (screenfull.isEnabled) { screenfull.request()